Skip to content
Snippets Groups Projects
Commit 0a94e9a9 authored by Michael Day's avatar Michael Day
Browse files

Plane: battery autoland failsafe checks for ACS prelanding state now.

Therefore, the battery failsafe will not interrupt an already landing
plane.
parent 5f3f3342
No related branches found
No related tags found
No related merge requests found
......@@ -134,11 +134,13 @@ void Plane::low_battery_event(void)
if (flight_stage != AP_SpdHgtControl::FLIGHT_LAND_FINAL &&
flight_stage != AP_SpdHgtControl::FLIGHT_LAND_APPROACH) {
#if AP_ACS_USE == TRUE
gcs_send_text_P(MAV_SEVERITY_CRITICAL,PSTR("Battery low: auto-landing."));
if (! acs.preland_started()) {
gcs_send_text_P(MAV_SEVERITY_CRITICAL,PSTR("Battery low: auto-landing."));
//start landing if not already (ACS-specific behavior -- land vice RTL)
if (! jump_to_landing_sequence()) {
gcs_send_text_P(MAV_SEVERITY_CRITICAL,PSTR("Failed to start emergency land sequence!!"));
//start landing if not already (ACS-specific behavior -- land vice RTL)
if (! jump_to_landing_sequence()) {
gcs_send_text_P(MAV_SEVERITY_CRITICAL,PSTR("Failed to start emergency land sequence!!"));
}
}
#else
set_mode(RTL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment