mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-22 22:32:11 +08:00
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:
@@ -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]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user