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:
parent
d46272dcd4
commit
b240b7571c
6 changed files with 118 additions and 166 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue