From 40bb2b0ad9b1c9883826370c08544f0a3c8b7c0a Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Tue, 2 Jan 2018 14:48:30 +0900 Subject: [PATCH] AR_AttitudeControl: set throttle speed pid dt --- libraries/APM_Control/AR_AttitudeControl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/APM_Control/AR_AttitudeControl.cpp b/libraries/APM_Control/AR_AttitudeControl.cpp index 3ebd871fc2..f1e8aa6ca7 100644 --- a/libraries/APM_Control/AR_AttitudeControl.cpp +++ b/libraries/APM_Control/AR_AttitudeControl.cpp @@ -320,6 +320,8 @@ float AR_AttitudeControl::get_throttle_out_speed(float desired_speed, bool motor if (_speed_last_ms == 0 || dt > 0.1f) { dt = 0.0f; _throttle_speed_pid.reset_filter(); + } else { + _throttle_speed_pid.set_dt(dt); } _speed_last_ms = now;