We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ed35e9 commit c2b6381Copy full SHA for c2b6381
src/modules/mc_pos_control/mc_pos_control_main.cpp
@@ -926,7 +926,8 @@ MulticopterPositionControl::control_manual(float dt)
926
if (fabsf(req_vel_sp(0)) < _params.hold_xy_dz && fabsf(req_vel_sp(1)) < _params.hold_xy_dz) {
927
if (!_pos_hold_engaged) {
928
929
- 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));
930
+
931
if (_params.hold_max_xy < FLT_EPSILON || vel_xy_mag < _params.hold_max_xy) {
932
/* reset position setpoint to have smooth transition from velocity control to position control */
933
_pos_hold_engaged = true;
0 commit comments