diff --git a/libraries/APM_Control/AR_AttitudeControl.cpp b/libraries/APM_Control/AR_AttitudeControl.cpp index 9854cd6d4de59e..03f40624d9e418 100644 --- a/libraries/APM_Control/AR_AttitudeControl.cpp +++ b/libraries/APM_Control/AR_AttitudeControl.cpp @@ -1046,7 +1046,7 @@ float AR_AttitudeControl::get_desired_speed_accel_limited(float desired_speed, f // acceleration limit desired speed float speed_change_max; - if (fabsf(desired_speed) < fabsf(_desired_speed) && is_positive(_throttle_decel_max)) { + if (fabsf(desired_speed) < fabsf(speed_prev) && is_positive(_throttle_decel_max)) { speed_change_max = _throttle_decel_max * dt; } else { speed_change_max = _throttle_accel_max * dt;