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
@@ -993,9 +993,12 @@ MulticopterPositionControl::task_main()
reset_yaw_sp = true;
}
// XXX Temporary: for vtol use we need to reset the yaw setpoint when we are doing a transition
if (_vehicle_status.in_transition_mode) {
reset_yaw_sp = true;
/* reset yaw and altitude setpoint for VTOL which are in fw mode */
if (_vehicle_status.is_vtol) {
if (!_vehicle_status.is_rotary_wing && !_vehicle_status.in_transition_mode) {
reset_yaw_sp = true;
_reset_alt_sp = true;
}
}
//Update previous arming state