From 1f0824b00ce12927dfda603430f801fbf2003c05 Mon Sep 17 00:00:00 2001 From: xyqyear Date: Sat, 16 Dec 2023 17:42:04 +0800 Subject: [PATCH] typo: threashold -> threshold --- config.h | 6 +++--- maimaiTouchControl.ino | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config.h b/config.h index 6cb5b06..95ae1f7 100644 --- a/config.h +++ b/config.h @@ -7,7 +7,7 @@ public: }; const uint8_t MPR_PADNUMS[] = {12, 12, 12, 12}; -const uint8_t THREASHOLD = 32; +const uint8_t THRESHOLD = 32; touchblock touchmap[34] = { // Group A @@ -51,8 +51,8 @@ touchblock touchmap[34] = { {0, 3, 0}, // 8 }; -// the release threashold will be set to THREASHOLD - RELEASE_THREASHOLD_OFFSET -const uint8_t RELEASE_THREASHOLD_OFFSET = 0; +// the release threashold will be set to THRESHOLD - RELEASE_THRESHOLD_OFFSET +const uint8_t RELEASE_THRESHOLD_OFFSET = 0; // AN3944 recommended values are: // MHDR = 1 diff --git a/maimaiTouchControl.ino b/maimaiTouchControl.ino index 25dbba6..9264c2b 100644 --- a/maimaiTouchControl.ino +++ b/maimaiTouchControl.ino @@ -210,8 +210,8 @@ void cmd_STAT() uint8_t mprid = touchmap[i].mprid; uint8_t portid = touchmap[i].portid; int8_t thresOffset = touchmap[i].thresOffset; - mpr[mprid].writeRegister(MPR121_TOUCHTH_0 + portid * 2, THREASHOLD + thresOffset); - mpr[mprid].writeRegister(MPR121_RELEASETH_0 + portid * 2, THREASHOLD - RELEASE_THREASHOLD_OFFSET + thresOffset); + mpr[mprid].writeRegister(MPR121_TOUCHTH_0 + portid * 2, THRESHOLD + thresOffset); + mpr[mprid].writeRegister(MPR121_RELEASETH_0 + portid * 2, THRESHOLD - RELEASE_THRESHOLD_OFFSET + thresOffset); } // setting ECR to enable electrodes