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
auto formatting on vertiq telem manager

fix formatting on header file
  • Loading branch information
vertiq-jordan committed Aug 21, 2024
1 parent e09a5a6 commit 27a531f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/drivers/actuators/vertiq_io/vertiq_serial_interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,3 @@ class VertiqSerialInterface


};


3 changes: 2 additions & 1 deletion src/drivers/actuators/vertiq_io/vertiq_telemetry_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ 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 27a531f

Please sign in to comment.