PositionControl: fix attitude setpoint timestamp

The plot of the attitude setpoint in the log did not show any values
because the message timestamp that the position control module sets
was overwritten by the PositionControl attitude generation.
This commit is contained in:
Matthias Grob
2019-11-04 19:11:54 +01:00
parent c6cc9f0902
commit b6de83117e
4 changed files with 7 additions and 9 deletions
@@ -367,7 +367,7 @@ void PositionControl::getLocalPositionSetpoint(vehicle_local_position_setpoint_s
void PositionControl::getAttitudeSetpoint(vehicle_attitude_setpoint_s &attitude_setpoint) const
{
attitude_setpoint = ControlMath::thrustToAttitude(_thr_sp, _yaw_sp);
ControlMath::thrustToAttitude(_thr_sp, _yaw_sp, attitude_setpoint);
attitude_setpoint.yaw_sp_move_rate = _yawspeed_sp;
}