FlightTaskManualPosition: rename updateXYsetpoints to updateXYlock

This commit is contained in:
Dennis Mannhart
2018-04-05 07:30:12 +02:00
committed by Beat Küng
parent efc2721add
commit 5d06464340
2 changed files with 3 additions and 5 deletions
@@ -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();
};