Skip to content

Commit

Permalink
Plane: check with mission if we should interupt failsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
IamPete1 committed Jan 18, 2020
1 parent 6362f69 commit 952d69d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ArduPlane/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void Plane::handle_battery_failsafe(const char *type_str, const int8_t action)
}
FALLTHROUGH;
case Failsafe_Action_RTL:
if (flight_stage != AP_Vehicle::FixedWing::FLIGHT_LAND && control_mode != &mode_qland && !quadplane.in_vtol_land_sequence()) {
if (flight_stage != AP_Vehicle::FixedWing::FLIGHT_LAND && control_mode != &mode_qland && !quadplane.in_vtol_land_sequence() && plane.mission.should_failsafe_interrupt()) {
// never stop a landing if we were already committed
set_mode(mode_rtl, ModeReason::BATTERY_FAILSAFE);
aparm.throttle_cruise.load();
Expand Down

0 comments on commit 952d69d

Please sign in to comment.