mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 03:01:36 +08:00
Flight tasks: avoid using *= for scalar to vector assignment
It's confusing and there is a corner case where the result is incorrect: *= 0 will not set the variable to 0 if it's already NAN.
This commit is contained in:
committed by
Dennis Mannhart
parent
bb756e0e12
commit
206baa7432
@@ -57,7 +57,7 @@ void FlightTaskManualPositionSmooth::_updateSetpoints()
|
||||
_velocity_setpoint(0) = vel_sp_xy(0);
|
||||
_velocity_setpoint(1) = vel_sp_xy(1);
|
||||
|
||||
/* Check for altitude lock.*/
|
||||
/* Check for xy position lock.*/
|
||||
_updateXYlock();
|
||||
|
||||
/* Smooth velocity in z.*/
|
||||
|
||||
Reference in New Issue
Block a user