mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_IOMCU: Change division to multiplication
This commit is contained in:
parent
4a9ddef8ee
commit
5b56d9104d
@ -435,7 +435,7 @@ void AP_IOMCU::read_erpm()
|
|||||||
for (uint8_t j = 0; j < 4; j++) {
|
for (uint8_t j = 0; j < 4; j++) {
|
||||||
const uint8_t esc_id = (i * 4 + j);
|
const uint8_t esc_id = (i * 4 + j);
|
||||||
if (dshot_erpm.update_mask & 1U<<esc_id) {
|
if (dshot_erpm.update_mask & 1U<<esc_id) {
|
||||||
update_rpm(esc_id, dshot_erpm.erpm[esc_id] * 200U / motor_poles, dshot_telem[i].error_rate[j] / 100.0);
|
update_rpm(esc_id, dshot_erpm.erpm[esc_id] * 200U / motor_poles, dshot_telem[i].error_rate[j] * 0.01);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user