mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 00:43:34 +08:00
FlightTaskManualAcceleration: fix velocity setpoint initialization
This commit is contained in:
committed by
Lorenz Meier
parent
89b502b9a0
commit
8816601efb
+2
-2
@@ -48,10 +48,10 @@ bool FlightTaskManualAcceleration::activate(const vehicle_local_position_setpoin
|
||||
bool ret = FlightTaskManualAltitudeSmoothVel::activate(last_setpoint);
|
||||
|
||||
if (PX4_ISFINITE(last_setpoint.vx)) {
|
||||
_velocity_setpoint.xy() = Vector2f(last_setpoint.vx, last_setpoint.vy);
|
||||
_stick_acceleration_xy.resetVelocity(Vector2f(last_setpoint.vx, last_setpoint.vy));
|
||||
|
||||
} else {
|
||||
_velocity_setpoint.xy() = _velocity.xy();
|
||||
_stick_acceleration_xy.resetVelocity(_velocity.xy());
|
||||
}
|
||||
|
||||
_stick_acceleration_xy.resetPosition();
|
||||
|
||||
Reference in New Issue
Block a user