Skip to content

Commit 78d45a5

Browse files
lthalltridge
authored andcommitted
AC_WPNav: AC_Loiter: Fix loiter level bug
1 parent 6a69464 commit 78d45a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/AC_WPNav/AC_Loiter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ void AC_Loiter::init_target()
118118
_pos_control.set_correction_speed_accel_xy(LOITER_VEL_CORRECTION_MAX, _accel_cmss);
119119
_pos_control.set_pos_error_max_xy_cm(LOITER_POS_CORRECTION_MAX);
120120

121-
// initialise position controller
122-
_pos_control.init_xy_controller();
121+
// initialise position controller and move target accelerations smoothly towards zero
122+
_pos_control.relax_velocity_controller_xy();
123123

124124
// initialise predicted acceleration and angles from the position controller
125125
_predicted_accel.x = _pos_control.get_accel_target_cmss().x;

0 commit comments

Comments
 (0)