Skip to content

Commit

Permalink
calculate esc_rpm in rpm instead of rad per second
Browse files Browse the repository at this point in the history
  • Loading branch information
vertiq-jordan committed Aug 21, 2024
1 parent 36af1d6 commit cd0a1bf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ uint16_t VertiqTelemetryManager::UpdateTelemetry()
// also update our internal report for logging
_esc_status.esc[_current_module_id_target_index].esc_address = _module_ids_in_use[_number_of_module_ids_for_telem];
_esc_status.esc[_current_module_id_target_index].timestamp = time_now;
_esc_status.esc[_current_module_id_target_index].esc_rpm = telem_response.speed;
_esc_status.esc[_current_module_id_target_index].esc_rpm = telem_response.speed * 60.0f * M_1_PI_F * 0.5f; //We get back rad/s, convert to rpm
_esc_status.esc[_current_module_id_target_index].esc_voltage = telem_response.voltage * 0.01;
_esc_status.esc[_current_module_id_target_index].esc_current = telem_response.current * 0.01;
_esc_status.esc[_current_module_id_target_index].esc_power =
Expand Down

0 comments on commit cd0a1bf

Please sign in to comment.