From 64c2a1070f43f5c3cfc779737471901a7dcd668f Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Wed, 7 Aug 2024 01:15:16 +0100 Subject: [PATCH] AP_ESC_Telem: SITL: fill in extended status values --- libraries/AP_ESC_Telem/AP_ESC_Telem_SITL.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/libraries/AP_ESC_Telem/AP_ESC_Telem_SITL.cpp b/libraries/AP_ESC_Telem/AP_ESC_Telem_SITL.cpp index 25f84fb285..cf435a2051 100644 --- a/libraries/AP_ESC_Telem/AP_ESC_Telem_SITL.cpp +++ b/libraries/AP_ESC_Telem/AP_ESC_Telem_SITL.cpp @@ -71,13 +71,28 @@ void AP_ESC_Telem_SITL::update() .voltage = 16.8f, .current = 0.8f, .consumption_mah = 1.0f, + .motor_temp_cdeg = 3500, +#if AP_EXTENDED_ESC_TELEM_ENABLED + .input_duty = 1, + .output_duty = 2, + .flags = 3, + .power_percentage = 4, +#endif }; update_telem_data(motor, t, AP_ESC_Telem_Backend::TelemetryType::CURRENT | AP_ESC_Telem_Backend::TelemetryType::VOLTAGE | AP_ESC_Telem_Backend::TelemetryType::CONSUMPTION - | AP_ESC_Telem_Backend::TelemetryType::TEMPERATURE); + | AP_ESC_Telem_Backend::TelemetryType::TEMPERATURE + | AP_ESC_Telem_Backend::TelemetryType::MOTOR_TEMPERATURE +#if AP_EXTENDED_ESC_TELEM_ENABLED + | AP_ESC_Telem_Backend::TelemetryType::POWER_PERCENTAGE + | AP_ESC_Telem_Backend::TelemetryType::INPUT_DUTY + | AP_ESC_Telem_Backend::TelemetryType::OUTPUT_DUTY + | AP_ESC_Telem_Backend::TelemetryType::FLAGS +#endif + ); } #endif }