Skip to content
Snippets Groups Projects
Commit cafb38e9 authored by Jonathan Challinger's avatar Jonathan Challinger Committed by Randy Mackay
Browse files

Copter: allow radio failsafe while disarmed so that user can be notified

parent 21beb264
No related branches found
No related tags found
No related merge requests found
......@@ -122,7 +122,7 @@ static void read_radio()
uint32_t elapsed = tnow_ms - last_update_ms;
// turn on throttle failsafe if no update from the RC Radio for 500ms or 2000ms if we are using RC_OVERRIDE
if (((!failsafe.rc_override_active && (elapsed >= FS_RADIO_TIMEOUT_MS)) || (failsafe.rc_override_active && (elapsed >= FS_RADIO_RC_OVERRIDE_TIMEOUT_MS))) &&
(g.failsafe_throttle && motors.armed() && !failsafe.radio)) {
(g.failsafe_throttle && (ap.rc_receiver_present||motors.armed()) && !failsafe.radio)) {
Log_Write_Error(ERROR_SUBSYSTEM_RADIO, ERROR_CODE_RADIO_LATE_FRAME);
set_failsafe_radio(true);
}
......@@ -142,7 +142,7 @@ static void set_throttle_and_failsafe(uint16_t throttle_pwm)
if (throttle_pwm < (uint16_t)g.failsafe_throttle_value) {
// if we are already in failsafe or motors not armed pass through throttle and exit
if (failsafe.radio || !motors.armed()) {
if (failsafe.radio || !(ap.rc_receiver_present || motors.armed())) {
g.rc_3.set_pwm(throttle_pwm);
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment