The delay on switches was * 10
This commit is contained in:
@@ -111,7 +111,7 @@ uint32_t check3PosSwitchPosition(uint8_t idx, EnumKeys sw, bool startup)
|
|||||||
result = (1 << index);
|
result = (1 << index);
|
||||||
switchesMidposStart[idx] = 0;
|
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;
|
index = sw - SW_SA0 + 1;
|
||||||
result = (1 << index);
|
result = (1 << index);
|
||||||
switchesMidposStart[idx] = 0;
|
switchesMidposStart[idx] = 0;
|
||||||
@@ -158,7 +158,7 @@ void getSwitchesPosition(bool startup)
|
|||||||
potsLastposStart[i] = get_tmr10ms();
|
potsLastposStart[i] = get_tmr10ms();
|
||||||
potsPos[i] = (pos << 4) | previousStoredPos;
|
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;
|
potsLastposStart[i] = 0;
|
||||||
potsPos[i] = (pos << 4) | pos;
|
potsPos[i] = (pos << 4) | pos;
|
||||||
if (previousStoredPos != pos) {
|
if (previousStoredPos != pos) {
|
||||||
|
|||||||
Reference in New Issue
Block a user