From bf9fc6dd98fedf91821c5d8507a239390feedbc7 Mon Sep 17 00:00:00 2001 From: bsongis Date: Sat, 7 Jun 2014 20:26:44 +0200 Subject: [PATCH] The delay on switches was * 10 --- radio/src/switches.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radio/src/switches.cpp b/radio/src/switches.cpp index 287eb6b25..c2a82473a 100644 --- a/radio/src/switches.cpp +++ b/radio/src/switches.cpp @@ -111,7 +111,7 @@ uint32_t check3PosSwitchPosition(uint8_t idx, EnumKeys sw, bool startup) result = (1 << index); switchesMidposStart[idx] = 0; } - else if (startup || (switchesPos & (1 << (sw - SW_SA0 + 1))) || g_eeGeneral.switchesDelay==0 || (switchesMidposStart[idx] && (tmr10ms_t)(get_tmr10ms() - switchesMidposStart[idx]) > 10*g_eeGeneral.switchesDelay)) { + else if (startup || (switchesPos & (1 << (sw - SW_SA0 + 1))) || g_eeGeneral.switchesDelay==0 || (switchesMidposStart[idx] && (tmr10ms_t)(get_tmr10ms() - switchesMidposStart[idx]) > g_eeGeneral.switchesDelay)) { index = sw - SW_SA0 + 1; result = (1 << index); switchesMidposStart[idx] = 0; @@ -158,7 +158,7 @@ void getSwitchesPosition(bool startup) potsLastposStart[i] = get_tmr10ms(); potsPos[i] = (pos << 4) | previousStoredPos; } - else if (startup || g_eeGeneral.switchesDelay==0 || (tmr10ms_t)(get_tmr10ms() - potsLastposStart[i]) > 10*g_eeGeneral.switchesDelay) { + else if (startup || g_eeGeneral.switchesDelay==0 || (tmr10ms_t)(get_tmr10ms() - potsLastposStart[i]) > g_eeGeneral.switchesDelay) { potsLastposStart[i] = 0; potsPos[i] = (pos << 4) | pos; if (previousStoredPos != pos) {