Plane: update comment and remove redundant work

- update_flight_stage is already called within restart_landing_sequence()
This commit is contained in:
Tom Pittenger 2016-11-23 15:42:10 -08:00 committed by Tom Pittenger
parent fc84c61672
commit e919afad1e
2 changed files with 2 additions and 4 deletions

View File

@ -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;

View File

@ -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;