diff --git a/libraries/AC_WPNav/AC_Loiter.cpp b/libraries/AC_WPNav/AC_Loiter.cpp index 4a903ef6af..b7571778e8 100644 --- a/libraries/AC_WPNav/AC_Loiter.cpp +++ b/libraries/AC_WPNav/AC_Loiter.cpp @@ -209,7 +209,7 @@ void AC_Loiter::sanity_check_params() void AC_Loiter::calc_desired_velocity(float nav_dt, bool avoidance_on) { float ekfGndSpdLimit, ekfNavVelGainScaler; - AP::ahrs_navekf().getEkfControlLimits(ekfGndSpdLimit, ekfNavVelGainScaler); + AP::ahrs().getEkfControlLimits(ekfGndSpdLimit, ekfNavVelGainScaler); // calculate a loiter speed limit which is the minimum of the value set by the LOITER_SPEED // parameter and the value set by the EKF to observe optical flow limits