diff --git a/ArduPlane/ArduPlane.cpp b/ArduPlane/ArduPlane.cpp index 3f7abb31a6..0dbaf206b0 100644 --- a/ArduPlane/ArduPlane.cpp +++ b/ArduPlane/ArduPlane.cpp @@ -943,21 +943,7 @@ void Plane::update_flight_stage(void) } else { set_flight_stage(AP_Vehicle::FixedWing::FLIGHT_LAND); } -/* - // FIXME: lift this into AP_Landing_Slope - } else if (flight_stage != AP_Vehicle::FixedWing::FLIGHT_LAND_APPROACH) { - bool heading_lined_up = abs(nav_controller->bearing_error_cd()) < 1000 && !nav_controller->data_is_stale(); - const bool on_flight_line = fabsf(nav_controller->crosstrack_error()) < 5.0f && !nav_controller->data_is_stale(); - bool below_prev_WP = current_loc.alt < prev_WP_loc.alt; - if ((mission.get_prev_nav_cmd_id() == MAV_CMD_NAV_LOITER_TO_ALT) || - (auto_state.wp_proportion >= 0 && heading_lined_up && on_flight_line) || - (auto_state.wp_proportion > 0.15f && heading_lined_up && below_prev_WP) || - (auto_state.wp_proportion > 0.5f)) { - set_flight_stage(AP_Vehicle::FixedWing::FLIGHT_LAND_APPROACH); - } else { - set_flight_stage(AP_Vehicle::FixedWing::FLIGHT_NORMAL); - } - }*/ + } else if (quadplane.in_assisted_flight()) { set_flight_stage(AP_Vehicle::FixedWing::FLIGHT_VTOL); } else {