AP_WheelEncoder: Change from division to multiplication

This commit is contained in:
murata 2022-03-12 02:39:48 +09:00 committed by Andrew Tridgell
parent 8f91fe9c2e
commit bf738b03a6
1 changed files with 1 additions and 1 deletions

View File

@ -203,7 +203,7 @@ float AP_WheelRateControl::get_rate_controlled_throttle(uint8_t instance, float
_last_update_ms = now;
// convert desired rate as a percentage to radians/sec
float desired_rate = desired_rate_pct / 100.0f * get_rate_max_rads();
float desired_rate = desired_rate_pct * 0.01f * get_rate_max_rads();
// get actual rate from wheeel encoder
float actual_rate = _wheel_encoder.get_rate(instance);