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:
Damjan Adamic
2016-01-10 18:52:42 +01:00
parent a76fc4c88c
commit 0ac9998e6b
2 changed files with 551 additions and 381 deletions
+5
View File
@@ -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;