Skip to content

Commit

Permalink
AP_ESC_Telem : fix backport issues for ESCX
Browse files Browse the repository at this point in the history
 - changed telemdata to _telem_data[i], and rpmdata to _rpm_data[i]
  • Loading branch information
Pradeep-Carbonix committed Aug 20, 2024
1 parent ad1406a commit c1b25f1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libraries/AP_ESC_Telem/AP_ESC_Telem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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
}
Expand Down

0 comments on commit c1b25f1

Please sign in to comment.