mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 10:43:34 +08:00
imxrt: dshot fix erpm calculation by implementing 3-bit exponent and 9-bit period
This commit is contained in:
committed by
David Sidrane
parent
3874b4c55d
commit
ff6966da57
@@ -312,8 +312,7 @@ int DShot::handle_new_bdshot_erpm(void)
|
||||
num_erpms++;
|
||||
esc_status.esc_online_flags |= 1 << channel;
|
||||
esc_status.esc[channel].timestamp = hrt_absolute_time();
|
||||
esc_status.esc[channel].esc_rpm = (erpm * 100) /
|
||||
(_param_mot_pole_count.get() / 2);
|
||||
esc_status.esc[channel].esc_rpm = (erpm * 100) / (_param_mot_pole_count.get() / 2);
|
||||
esc_status.esc[channel].actuator_function = _telemetry->actuator_functions[channel];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user