mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 21:35:44 +03:00
revert failsafe removal of else
This commit is contained in:
parent
ac6b8088c9
commit
cc1bb05a1e
1 changed files with 8 additions and 2 deletions
|
@ -216,8 +216,14 @@ void failsafeUpdateState(void)
|
||||||
failsafeState.receivingRxDataPeriodPreset = PERIOD_OF_1_SECONDS; // require 1 seconds of valid rxData
|
failsafeState.receivingRxDataPeriodPreset = PERIOD_OF_1_SECONDS; // require 1 seconds of valid rxData
|
||||||
reprocessState = true;
|
reprocessState = true;
|
||||||
} else if (!receivingRxData) {
|
} else if (!receivingRxData) {
|
||||||
failsafeState.phase = FAILSAFE_RX_LOSS_DETECTED;
|
if (millis() > failsafeState.throttleLowPeriod) {
|
||||||
|
// JustDisarm: throttle was LOW for at least 'failsafe_throttle_low_delay' seconds
|
||||||
|
failsafeActivate();
|
||||||
|
failsafeState.phase = FAILSAFE_LANDED; // skip auto-landing procedure
|
||||||
|
failsafeState.receivingRxDataPeriodPreset = PERIOD_OF_3_SECONDS; // require 3 seconds of valid rxData
|
||||||
|
} else {
|
||||||
|
failsafeState.phase = FAILSAFE_RX_LOSS_DETECTED;
|
||||||
|
}
|
||||||
reprocessState = true;
|
reprocessState = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue