Reset the altitude setpoint.

This commit is contained in:
Simon Wilks
2015-08-24 10:38:33 +02:00
parent 27e4139540
commit f7e4a4852d
2 changed files with 11 additions and 4 deletions
@@ -1027,7 +1027,11 @@ bool FixedwingPositionControl::update_desired_altitude(float dt)
_althold_epv = _global_pos.epv;
_was_in_deadband = true;
}
if (_vehicle_status.is_vtol) {
if (_vehicle_status.is_rotary_wing || _vehicle_status.in_transition_mode) {
_hold_alt = _global_pos.alt;
}
}
return climbout_mode;
}