1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 09:15:38 +03:00

The delay on switches was * 10

This commit is contained in:
bsongis 2014-06-07 20:26:44 +02:00
parent 6edc28b4ba
commit bf9fc6dd98

View file

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