mirror of https://github.com/ArduPilot/ardupilot
Plane: remove old commented code
- leftover from the AP_Landing stage refactor
This commit is contained in:
parent
da48b24a5c
commit
1a34221db9
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue