This commit is contained in:
Bertrand Songis
2018-04-15 09:46:17 +02:00
committed by GitHub
parent bae00c0e20
commit 9c4a81a6ee
+4 -1
View File
@@ -139,6 +139,9 @@ int expo(int x, int k)
if (neg) { if (neg) {
x = -x; x = -x;
} }
if (x > (int)RESXu) {
x = RESXu;
}
if (k < 0) { if (k < 0) {
y = RESXu - expou(RESXu-x, -k); y = RESXu - expou(RESXu-x, -k);
} }
@@ -793,7 +796,7 @@ void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms)
chans[md->destCh] = 0; chans[md->destCh] = 0;
} }
//========== PHASE && SWITCH ===== //========== FLIGHT MODE && SWITCH =====
bool mixCondition = (md->flightModes != 0 || md->swtch); bool mixCondition = (md->flightModes != 0 || md->swtch);
delayval_t mixEnabled = (!(md->flightModes & (1 << mixerCurrentFlightMode)) && getSwitch(md->swtch)) ? DELAY_POS_MARGIN+1 : 0; delayval_t mixEnabled = (!(md->flightModes & (1 << mixerCurrentFlightMode)) && getSwitch(md->swtch)) ? DELAY_POS_MARGIN+1 : 0;