Skip to content

Commit

Permalink
[fixedwing] allow to trigger kill mode from RC
Browse files Browse the repository at this point in the history
  • Loading branch information
gautierhattenberger committed Oct 8, 2019
1 parent 0bdcc09 commit 6058cfb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sw/airborne/firmwares/fixedwing/autopilot_static.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ void autopilot_static_on_rc_frame(void)
mode_changed = autopilot_set_mode(RC_LOST_MODE);
}

#ifdef RADIO_KILL_SWITCH
if (imcu_get_radio(RADIO_KILL_SWITCH) < MIN_PPRZ / 2) {
autopilot_set_kill_throttle(true);
}
#endif

/* If in-flight, with good GPS but too far, then activate HOME mode
* In MANUAL with good RC, FBW will allow to override. */
if (autopilot_get_mode() != AP_MODE_HOME && autopilot_get_mode() != AP_MODE_GPS_OUT_OF_ORDER && autopilot.launch) {
Expand Down

0 comments on commit 6058cfb

Please sign in to comment.