mirror of https://github.com/ArduPilot/ardupilot
Plane: fixed auto ICE engine cut in QLAND final
This commit is contained in:
parent
3adf8c3e51
commit
841828541d
|
@ -759,6 +759,10 @@ void QuadPlane::control_loiter()
|
|||
float height_above_ground = plane.relative_ground_altitude(plane.g.rangefinder_landing);
|
||||
if (height_above_ground < land_final_alt && poscontrol.state < QPOS_LAND_FINAL) {
|
||||
poscontrol.state = QPOS_LAND_FINAL;
|
||||
// cut IC engine if enabled
|
||||
if (land_icengine_cut != 0) {
|
||||
plane.g2.ice_control.engine_control(0, 0, 0);
|
||||
}
|
||||
}
|
||||
float descent_rate = (poscontrol.state == QPOS_LAND_FINAL)? land_speed_cms:landing_descent_rate_cms(height_above_ground);
|
||||
pos_control->set_alt_target_from_climb_rate(-descent_rate, plane.G_Dt, true);
|
||||
|
|
Loading…
Reference in New Issue