Skip to content

Commit

Permalink
adjust to astyle format
Browse files Browse the repository at this point in the history
  • Loading branch information
Stifael authored and LorenzMeier committed Dec 7, 2016
1 parent 5ed35e9 commit c2b6381
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/mc_pos_control/mc_pos_control_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c2b6381

Please sign in to comment.