1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-23 16:25:26 +03:00

Decoupling failsafe and RX code; Making RX code independent of RX provider

This commit is contained in:
Konstantin (DigitalEntity) Sharlaimov 2017-04-25 23:07:36 +10:00 committed by Konstantin Sharlaimov (DigitalEntity)
parent d46272dcd4
commit b240b7571c
6 changed files with 118 additions and 166 deletions

View file

@ -181,9 +181,7 @@ void processRcStickPositions(throttleStatus_e throttleStatus, bool disarm_kill_s
if (ARMING_FLAG(ARMED) && !IS_RC_MODE_ACTIVE(BOXFAILSAFE) && rxIsReceivingSignal() && !failsafeIsActive()) {
rcDisarmTicks++;
if (rcDisarmTicks > 3) { // Wait for at least 3 RX ticks (60ms @ 50Hz RX)
if (disarm_kill_switch) {
mwDisarm(DISARM_SWITCH);
} else if (throttleStatus == THROTTLE_LOW) {
if (disarm_kill_switch || (throttleStatus == THROTTLE_LOW)) {
mwDisarm(DISARM_SWITCH);
}
}