mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
Plane: update comment and remove redundant work
- update_flight_stage is already called within restart_landing_sequence()
This commit is contained in:
parent
fc84c61672
commit
e919afad1e
@ -525,7 +525,8 @@ void Plane::handle_auto_mode(void)
|
||||
uint16_t nav_cmd_id;
|
||||
|
||||
if (mission.state() != AP_Mission::MISSION_RUNNING) {
|
||||
// this should never be reached
|
||||
// this could happen if AP_Landing::restart_landing_sequence() returns false which would only happen if:
|
||||
// restart_landing_sequence() is called when not executing a NAV_LAND or there is no previous nav point
|
||||
set_mode(RTL, MODE_REASON_MISSION_END);
|
||||
GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_INFO, "Aircraft in auto without a running mission");
|
||||
return;
|
||||
|
@ -546,9 +546,6 @@ void Plane::exit_mode(enum FlightMode mode)
|
||||
if (mission.get_current_nav_cmd().id == MAV_CMD_NAV_LAND)
|
||||
{
|
||||
landing.restart_landing_sequence();
|
||||
|
||||
// exit landing stages if we're no longer executing NAV_LAND
|
||||
update_flight_stage();
|
||||
}
|
||||
}
|
||||
auto_state.started_flying_in_auto_ms = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user