StickAccelerationXY: fix acceleration reset using x component instead of y

This entire feature only has an impact if the last mode set
a huge acceleration and we have to take over as smooth as possible.
But it's stil lworth fixing.
This commit is contained in:
Matthias Grob 2021-04-21 14:33:39 +02:00 committed by Daniel Agar
parent fee4728b1f
commit 5e75f17680
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ void StickAccelerationXY::resetVelocity(const matrix::Vector2f &velocity)
void StickAccelerationXY::resetAcceleration(const matrix::Vector2f &acceleration)
{
_acceleration_slew_rate_x.setForcedValue(acceleration(0));
_acceleration_slew_rate_x.setForcedValue(acceleration(1));
_acceleration_slew_rate_y.setForcedValue(acceleration(1));
}
void StickAccelerationXY::generateSetpoints(Vector2f stick_xy, const float yaw, const float yaw_sp, const Vector3f &pos,