FlightTaskManualAltitude: call FlightTaskManualStabilized::_updateHeadingSetpoints() directly

Instead of calling _updateSetpoints(), that also sets the thrust setpoint,
which is then overwritten again.
This commit is contained in:
Beat Küng
2018-10-04 15:09:02 +02:00
committed by Dennis Mannhart
parent 206baa7432
commit e23382c6da
2 changed files with 4 additions and 5 deletions
@@ -251,9 +251,7 @@ void FlightTaskManualAltitude::_respectMaxAltitude()
void FlightTaskManualAltitude::_updateSetpoints()
{
FlightTaskManualStabilized::_updateSetpoints(); // get yaw and thrust setpoints
_thrust_setpoint *= NAN; // Don't need thrust setpoint from Stabilized mode.
FlightTaskManualStabilized::_updateHeadingSetpoints(); // get yaw setpoint
// Thrust in xy are extracted directly from stick inputs. A magnitude of
// 1 means that maximum thrust along xy is demanded. A magnitude of 0 means no
@@ -269,6 +267,7 @@ void FlightTaskManualAltitude::_updateSetpoints()
_thrust_setpoint(0) = sp(0);
_thrust_setpoint(1) = sp(1);
_thrust_setpoint(2) = NAN;
_updateAltitudeLock();
}