Fixes #2939: Logical switch internal state was being reset by the AND switch, that affected its function (it looked like AND was applied before the EDGE processing, not after like it is done for other logical switch types). (ported from master branch)
This commit is contained in:
@@ -336,7 +336,12 @@ bool getLogicalSwitch(uint8_t idx)
|
||||
#endif
|
||||
|
||||
if (ls->func == LS_FUNC_NONE || (s && !getSwitch(s))) {
|
||||
#if defined(CPUARM)
|
||||
if (ls->func != LS_FUNC_STICKY && ls->func != LS_FUNC_EDGE ) {
|
||||
#else
|
||||
if (ls->func != LS_FUNC_STICKY) {
|
||||
#endif
|
||||
// AND switch must not affect STICKY and EDGE processing
|
||||
LS_LAST_VALUE(mixerCurrentFlightMode, idx) = CS_LAST_VALUE_INIT;
|
||||
}
|
||||
result = false;
|
||||
|
||||
Reference in New Issue
Block a user