FlightTaskManualAcceleration: reset position lock on reactivation

to prevent having a fixed position lock while moving the vehicle
on the ground before flying.
This commit is contained in:
Matthias Grob
2020-11-30 17:14:20 +01:00
parent 66f8fc08c0
commit 3f3a82e034
@@ -54,6 +54,8 @@ bool FlightTaskManualAcceleration::activate(const vehicle_local_position_setpoin
_velocity_setpoint.xy() = Vector2f(_velocity);
}
_stick_acceleration_xy.resetPosition();
if (PX4_ISFINITE(last_setpoint.acceleration[0])) {
_stick_acceleration_xy.resetAcceleration(Vector2f(last_setpoint.acceleration[0], last_setpoint.acceleration[1]));
}