Browse Source

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

master
Jonathan Challinger 10 years ago committed by Randy Mackay
parent
commit
cafb38e923
  1. 4
      ArduCopter/radio.pde

4
ArduCopter/radio.pde

@ -122,7 +122,7 @@ static void read_radio() @@ -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) @@ -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;
}

Loading…
Cancel
Save