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

This commit is contained in:
Andy Piper 2023-01-09 16:33:49 +00:00 committed by Andrew Tridgell
parent 80fb33fb8b
commit c620ba58df

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