Skip to content

Commit

Permalink
rotorcraft arming: also prevent switching motors on via settings/GCS …
Browse files Browse the repository at this point in the history
…if AHRS is not aligned (unless AUTOPILOT_DISABLE_AHRS_KILL is defined)
  • Loading branch information
flixr committed Apr 6, 2012
1 parent 9a7dff4 commit 06c7a2e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sw/airborne/firmwares/rotorcraft/autopilot.c
Expand Up @@ -223,7 +223,10 @@ static inline void autopilot_check_in_flight( bool_t motors_on ) {


void autopilot_set_motors_on(bool_t motors_on) {
autopilot_motors_on = motors_on;
if (ahrs_is_aligned && motors_on)
autopilot_motors_on = TRUE;
else
autopilot_motors_on = FALSE;
kill_throttle = ! autopilot_motors_on;
autopilot_arming_set(autopilot_motors_on);
}
Expand Down

0 comments on commit 06c7a2e

Please sign in to comment.