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:
parent
6edc28b4ba
commit
bf9fc6dd98
1 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue