mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 04:53:35 +08:00
FlightTaskManualPosition: rename updateXYsetpoints to updateXYlock
This commit is contained in:
committed by
Beat Küng
parent
efc2721add
commit
5d06464340
@@ -80,7 +80,7 @@ void FlightTaskManualPosition::_scaleSticks()
|
||||
_vel_sp_xy = matrix::Vector2f(vel_sp(0), vel_sp(1));
|
||||
}
|
||||
|
||||
void FlightTaskManualPosition::_updateXYsetpoints()
|
||||
void FlightTaskManualPosition::_updateXYlock()
|
||||
{
|
||||
/* If position lock is not active, position setpoint is set to NAN.*/
|
||||
const float vel_xy_norm = Vector2f(&_velocity(0)).length();
|
||||
@@ -98,7 +98,7 @@ void FlightTaskManualPosition::_updateXYsetpoints()
|
||||
void FlightTaskManualPosition::_updateSetpoints()
|
||||
{
|
||||
FlightTaskManualAltitude::_updateSetpoints(); // get yaw and z setpoints
|
||||
_updateXYsetpoints(); // get xy setpoints
|
||||
_updateXYlock(); // check for position lock
|
||||
}
|
||||
|
||||
bool FlightTaskManualPosition::update()
|
||||
|
||||
@@ -61,9 +61,7 @@ protected:
|
||||
control::BlockParamFloat _acc_xy_max;/**< Maximum acceleration horizontally. Only used to compute lock time. */
|
||||
control::BlockParamFloat _vel_xy_dz; /**< velocity threshold/deadzone to switch into horizontal position hold */
|
||||
|
||||
void _updateXYlock(); /**< Applies positon lock based on stick and velocity */
|
||||
void _updateSetpoints() override;
|
||||
void _scaleSticks() override;
|
||||
|
||||
private:
|
||||
void _updateXYsetpoints();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user