typo: threashold -> threshold

main
xyqyear 2023-12-16 17:42:04 +08:00
parent 24c0ff2b81
commit 1f0824b00c
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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