FlightTask: activate tasks with setpoints in use

This commit is contained in:
Dennis Mannhart
2018-07-20 09:26:18 +02:00
committed by Lorenz Meier
parent 389f897b04
commit 216279b576
5 changed files with 11 additions and 1 deletions
@@ -43,6 +43,9 @@ using namespace matrix;
bool FlightTaskManualAltitude::activate()
{
bool ret = FlightTaskManualStabilized::activate();
_thrust_setpoint(2) = NAN; // altitude is controlled from position/velocity
_position_setpoint(2) = _position(2);
_velocity_setpoint(2) = 0.0f;
_setDefaultConstraints();
return ret;
}