From c1b25f179dafbd4b5367e62b0412fd2fbc4915f1 Mon Sep 17 00:00:00 2001 From: Pradeep CK Date: Tue, 20 Aug 2024 10:21:20 +1000 Subject: [PATCH] AP_ESC_Telem : fix backport issues for ESCX - changed telemdata to _telem_data[i], and rpmdata to _rpm_data[i] --- libraries/AP_ESC_Telem/AP_ESC_Telem.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/AP_ESC_Telem/AP_ESC_Telem.cpp b/libraries/AP_ESC_Telem/AP_ESC_Telem.cpp index 2b46e571f6..60c40be062 100644 --- a/libraries/AP_ESC_Telem/AP_ESC_Telem.cpp +++ b/libraries/AP_ESC_Telem/AP_ESC_Telem.cpp @@ -578,8 +578,8 @@ void AP_ESC_Telem::update() || _rpm_data[i].last_update_us != _last_rpm_log_us[i]) { // Update last log timestamps - _last_telem_log_ms[i] = telemdata.last_update_ms; - _last_rpm_log_us[i] = rpmdata.last_update_us; + _last_telem_log_ms[i] = _telem_data[i].last_update_ms; + _last_rpm_log_us[i] = _rpm_data[i].last_update_us; float rpm = AP::logger().quiet_nanf(); get_rpm(i, rpm); @@ -616,7 +616,7 @@ void AP_ESC_Telem::update() // input duty: duty cycle input to the ESC in percent // output duty: duty cycle output to the motor in percent // status flags: manufacurer-specific status flags - const bool has_ext_data = telemdata.types & + const bool has_ext_data = _telem_data[i].types & (AP_ESC_Telem_Backend::TelemetryType::INPUT_DUTY | AP_ESC_Telem_Backend::TelemetryType::OUTPUT_DUTY | AP_ESC_Telem_Backend::TelemetryType::FLAGS); @@ -635,9 +635,9 @@ void AP_ESC_Telem::update() "Q" "B" "B" "B" "I", AP_HAL::micros64(), i, - telemdata.input_duty, - telemdata.output_duty, - telemdata.flags); + _telem_data[i].input_duty, + _telem_data[i].output_duty, + _telem_data[i].flags); } #endif //AP_EXTENDED_ESC_TELEM_ENABLED }