From cd0a1bf6be444e0c2defcedc396757c4563b3913 Mon Sep 17 00:00:00 2001 From: Jordan Leiber Date: Wed, 21 Aug 2024 09:49:08 -0400 Subject: [PATCH] calculate esc_rpm in rpm instead of rad per second --- src/drivers/actuators/vertiq_io/vertiq_telemetry_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/actuators/vertiq_io/vertiq_telemetry_manager.cpp b/src/drivers/actuators/vertiq_io/vertiq_telemetry_manager.cpp index 0c5bc85ca8a5..50ea799726ce 100644 --- a/src/drivers/actuators/vertiq_io/vertiq_telemetry_manager.cpp +++ b/src/drivers/actuators/vertiq_io/vertiq_telemetry_manager.cpp @@ -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 =