Browse Source

AP_Arming: Allow disarming to force the safety switch

master
Michael du Breuil 6 years ago committed by Andrew Tridgell
parent
commit
c4ff1f4307
  1. 8
      libraries/AP_Arming/AP_Arming.cpp

8
libraries/AP_Arming/AP_Arming.cpp

@ -731,6 +731,14 @@ bool AP_Arming::disarm() @@ -731,6 +731,14 @@ bool AP_Arming::disarm()
gcs().send_text(MAV_SEVERITY_INFO, "Throttle disarmed");
#if HAL_HAVE_SAFETY_SWITCH
AP_BoardConfig *board_cfg = AP_BoardConfig::get_instance();
if ((board_cfg != nullptr) &&
(board_cfg->get_safety_button_options() & AP_BoardConfig::BOARD_SAFETY_OPTION_SAFETY_ON_DISARM)) {
hal.rcout->force_safety_on();
}
#endif // HAL_HAVE_SAFETY_SWITCH
//TODO: Log motor disarming to the dataflash
//Can't do this from this class until there is a unified logging library.

Loading…
Cancel
Save