Skip to content

Commit

Permalink
[rotorcraft] add FAILSAFE_ON_BAT_CRITICAL
Browse files Browse the repository at this point in the history
set FAILSAFE_ON_BAT_CRITICAL to TRUE if you want to go into FAILSAFE mode (neutral attitude, slowly descend)
if battery status is critical (vsupply voltage below CRITIC_BAT_LEVEL for a while)
  • Loading branch information
flixr committed Sep 1, 2013
1 parent e308204 commit 9489857
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sw/airborne/firmwares/rotorcraft/main.c
Expand Up @@ -222,6 +222,14 @@ STATIC_INLINE void failsafe_check( void ) {
autopilot_set_mode(AP_MODE_FAILSAFE);
}

#if FAILSAFE_ON_BAT_CRITICAL
if (autopilot_mode != AP_MODE_KILL &&
electrical.bat_critical)
{
autopilot_set_mode(AP_MODE_FAILSAFE);
}
#endif

#if USE_GPS
if (autopilot_mode == AP_MODE_NAV &&
autopilot_motors_on &&
Expand Down

0 comments on commit 9489857

Please sign in to comment.