AP_Motors: use _dt instead of loop rate for throttle slew calculation

This commit is contained in:
Andy Piper
2023-01-11 18:59:52 +11:00
committed by Andrew Tridgell
parent 80fb33fb8b
commit c620ba58df
+1 -1
View File
@@ -314,7 +314,7 @@ void AP_MotorsMulticopter::update_throttle_filter()
// calculate slope normalized from per-micro
const float rate = fabsf(_throttle_slew.slope() * 1e6);
_throttle_slew_rate = _throttle_slew_filter.apply(rate, 1.0f / _loop_rate);
_throttle_slew_rate = _throttle_slew_filter.apply(rate, _dt);
}
// return current_limit as a number from 0 ~ 1 in the range throttle_min to throttle_max