diff --git a/libraries/AC_WPNav/AC_WPNav.cpp b/libraries/AC_WPNav/AC_WPNav.cpp index 33ad8135cf..07de7cfa4c 100644 --- a/libraries/AC_WPNav/AC_WPNav.cpp +++ b/libraries/AC_WPNav/AC_WPNav.cpp @@ -341,7 +341,7 @@ void AC_WPNav::wp_and_spline_init() void AC_WPNav::set_speed_xy(float speed_cms) { // range check new target speed and update position controller - if (_wp_speed_cms >= WPNAV_WP_SPEED_MIN) { + if (speed_cms >= WPNAV_WP_SPEED_MIN) { _wp_speed_cms = speed_cms; _pos_control.set_speed_xy(_wp_speed_cms); // flag that wp leash must be recalculated