mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-03 10:50:35 +08:00
Refactor: Use new matrix::Vector2f constructor
This commit is contained in:
committed by
Daniel Agar
parent
ada0179cda
commit
bee6a6b8b0
@@ -40,7 +40,7 @@
|
||||
using namespace matrix;
|
||||
|
||||
FlightTaskManualPositionSmooth::FlightTaskManualPositionSmooth() :
|
||||
_smoothingXY(this, matrix::Vector2f(&_velocity(0))),
|
||||
_smoothingXY(this, Vector2f(_velocity)),
|
||||
_smoothingZ(this, _velocity(2), _sticks(2))
|
||||
{}
|
||||
|
||||
@@ -50,8 +50,8 @@ void FlightTaskManualPositionSmooth::_updateSetpoints()
|
||||
FlightTaskManualPosition::_updateSetpoints();
|
||||
|
||||
/* Smooth velocity setpoint in xy.*/
|
||||
matrix::Vector2f vel(&_velocity(0));
|
||||
Vector2f vel_sp_xy = Vector2f(&_velocity_setpoint(0));
|
||||
Vector2f vel(_velocity);
|
||||
Vector2f vel_sp_xy(_velocity_setpoint);
|
||||
_smoothingXY.updateMaxVelocity(_constraints.speed_xy);
|
||||
_smoothingXY.smoothVelocity(vel_sp_xy, vel, _yaw, _yawspeed_setpoint, _deltatime);
|
||||
_velocity_setpoint(0) = vel_sp_xy(0);
|
||||
|
||||
Reference in New Issue
Block a user