From abfbc75fed87708bd2ddc000f3b04d29ef10398b Mon Sep 17 00:00:00 2001 From: bsongis Date: Mon, 2 Jun 2014 16:18:58 +0200 Subject: [PATCH] Last minute modification for 6-pos switch steps detection. Needs to be tested again! --- radio/src/gui/menu_general.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/radio/src/gui/menu_general.cpp b/radio/src/gui/menu_general.cpp index 9165dcd66..6b55eeef3 100644 --- a/radio/src/gui/menu_general.cpp +++ b/radio/src/gui/menu_general.cpp @@ -1459,7 +1459,8 @@ void menuGeneralHardware(uint8_t event) } #endif -#define XPOT_DELTA 5 +#define XPOT_DELTA 7 +#define XPOT_DELAY 15 /* cycles */ void menuCommonCalib(uint8_t event) { @@ -1480,7 +1481,7 @@ void menuCommonCalib(uint8_t event) else { if (reusableBuffer.calib.xpotsCalib[idx].lastCount < 255) reusableBuffer.calib.xpotsCalib[idx].lastCount++; } - if (reusableBuffer.calib.xpotsCalib[idx].lastCount == 10/*100ms*/) { + if (reusableBuffer.calib.xpotsCalib[idx].lastCount == XPOT_DELAY) { int16_t position = reusableBuffer.calib.xpotsCalib[idx].lastPosition; bool found = false; for (int j=0; j