FlightTaskManualPosition: use existing stick library rotation

This commit is contained in:
Matthias Grob
2023-04-15 21:57:40 +02:00
parent 7b850a91b4
commit 7ebd6cc74f
3 changed files with 2 additions and 15 deletions
@@ -91,8 +91,8 @@ void FlightTaskManualPosition::_scaleSticks()
// scale velocity to its maximum limits
Vector2f vel_sp_xy = stick_xy * velocity_scale;
/* Rotate setpoint into local frame. */
_rotateIntoHeadingFrame(vel_sp_xy);
// Rotate setpoint into local frame
Sticks::rotateIntoHeadingFrameXY(vel_sp_xy, _yaw, _yaw_setpoint);
// collision prevention
if (_collision_prevention.is_active()) {