Fixes #2434
This commit is contained in:
+13
-3
@@ -444,11 +444,21 @@ bool getSwitch(int8_t swtch)
|
|||||||
}
|
}
|
||||||
else if (cs_idx <= SWSRC_LAST_SWITCH) {
|
else if (cs_idx <= SWSRC_LAST_SWITCH) {
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
if ((flags & GETSWITCH_MIDPOS_DELAY) && IS_3POS(cs_idx))
|
if (flags & GETSWITCH_MIDPOS_DELAY) {
|
||||||
|
div_t swinfo = switchInfo(cs_idx);
|
||||||
|
if (IS_3POS(swinfo.quot)) {
|
||||||
result = SWITCH_POSITION(cs_idx-SWSRC_FIRST_SWITCH);
|
result = SWITCH_POSITION(cs_idx-SWSRC_FIRST_SWITCH);
|
||||||
else
|
}
|
||||||
#endif
|
else {
|
||||||
result = switchState((EnumKeys)(SW_BASE+cs_idx-SWSRC_FIRST_SWITCH));
|
result = switchState((EnumKeys)(SW_BASE+cs_idx-SWSRC_FIRST_SWITCH));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
result = switchState((EnumKeys)(SW_BASE+cs_idx-SWSRC_FIRST_SWITCH));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
result = switchState((EnumKeys)(SW_BASE+cs_idx-SWSRC_FIRST_SWITCH));
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(MODULE_ALWAYS_SEND_PULSES)
|
#if defined(MODULE_ALWAYS_SEND_PULSES)
|
||||||
if (startupWarningState < STARTUP_WARNING_DONE) {
|
if (startupWarningState < STARTUP_WARNING_DONE) {
|
||||||
|
|||||||
Reference in New Issue
Block a user