mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
adjust to astyle format
This commit is contained in:
committed by
Lorenz Meier
parent
5ed35e9731
commit
c2b6381759
@@ -926,7 +926,8 @@ MulticopterPositionControl::control_manual(float dt)
|
||||
if (fabsf(req_vel_sp(0)) < _params.hold_xy_dz && fabsf(req_vel_sp(1)) < _params.hold_xy_dz) {
|
||||
if (!_pos_hold_engaged) {
|
||||
|
||||
float vel_xy_mag = sqrtf(_vel(0)*_vel(0) + _vel(1)*_vel(1));
|
||||
float vel_xy_mag = sqrtf(_vel(0) * _vel(0) + _vel(1) * _vel(1));
|
||||
|
||||
if (_params.hold_max_xy < FLT_EPSILON || vel_xy_mag < _params.hold_max_xy) {
|
||||
/* reset position setpoint to have smooth transition from velocity control to position control */
|
||||
_pos_hold_engaged = true;
|
||||
|
||||
Reference in New Issue
Block a user