Skip to content

Commit

Permalink
mc_pos_control: set default correctly if vel_sp_xy is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
Stifael committed Mar 30, 2017
1 parent d04acf1 commit 7c712ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/mc_pos_control/mc_pos_control_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,7 @@ MulticopterPositionControl::vel_sp_slewrate(float dt)
acc_limit = _acceleration_hor_manual.get();

/* get normalized direction */
matrix::Vector2f vel_sp_xy_norm = (vel_sp_xy.length() > 0.0f) ? vel_sp_xy.normalized() : vel_sp_xy_norm;
matrix::Vector2f vel_sp_xy_norm = (vel_sp_xy.length() > 0.0f) ? vel_sp_xy.normalized() : vel_sp_xy;
matrix::Vector2f vel_xy_norm = (vel_xy.length() > 0.0f) ? vel_xy.normalized() : vel_xy;

/* check if deceleration is required */
Expand Down

0 comments on commit 7c712ac

Please sign in to comment.