Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_ESC_Telem / AP_DroneCAN: add support for extended ESC status message. #27755

Merged
merged 3 commits into from
Aug 6, 2024

Conversation

IamPete1
Copy link
Member

@IamPete1 IamPete1 commented Aug 5, 2024

This is a rework of #27248. This adds support for the DroneCAN extended ESC status message. The new fields input duty, output duty and flags are logged in a new message. The extended message also contains motor temperature which is logged in the existing ESC message. This functionality is enabled with AP_EXTENDED_ESC_TELEM_ENABLED which is true if DroneCAN is enabled.

A number of ESCs from APD and Currawong support this message.

 - Conditional compilation definition : AP_EXTENDED_ESC_TELEM_ENABLE
 - ESCX log structure
 - Update functionalities for ESCX status message
 - ESCX DroneCAN callback
 - Conditional compilation definition : AP_EXTENDED_ESC_TELEM_ENABLE
 - ESCX log structure
 - Update functionalities for ESCX status message
 - ESCX DroneCAN callback
 - Conditional compilation definition : AP_EXTENDED_ESC_TELEM_ENABLE
 - ESCX log structure
 - Update functionalities for ESCX status message
 - ESCX DroneCAN callback
Copy link
Collaborator

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tridge tridge merged commit a6fe130 into ArduPilot:master Aug 6, 2024
93 checks passed
@@ -492,6 +492,18 @@ void AP_ESC_Telem::update_telem_data(const uint8_t esc_index, const AP_ESC_Telem
telemdata.usage_s = new_data.usage_s;
}

#if AP_EXTENDED_ESC_TELEM_ENABLED
if (data_mask & AP_ESC_Telem_Backend::TelemetryType::INPUT_DUTY) {
_telem_data[esc_index].input_duty = new_data.input_duty;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should _telem_data[esc_index] be replaced with telemdata? When we opened the original PR you based this, we did not notice the changes made in #26252

I can open the PR to fix that if you think we should.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robertlong13 yeah your right. A PR would be great, thanks!

robertlong13 added a commit to robertlong13/ardupilot that referenced this pull request Sep 10, 2024
When ArduPilot#27755 was first opened, ArduPilot#26252 had not been merged yet. ArduPilot#26252
refactored a bit, but the change was not applied to ArduPilot#27755. This commit
fixes that.

This should not change the behavior of the code.
robertlong13 added a commit to robertlong13/ardupilot that referenced this pull request Sep 10, 2024
When ArduPilot#27755 was first opened, ArduPilot#26252 had not been merged yet. ArduPilot#26252
refactored a bit, but the change was not applied to ArduPilot#27755. This commit
fixes that.

This should not change the behavior of the code.
peterbarker pushed a commit that referenced this pull request Sep 11, 2024
When #27755 was first opened, #26252 had not been merged yet. #26252
refactored a bit, but the change was not applied to #27755. This commit
fixes that.

This should not change the behavior of the code.
arg7 pushed a commit to arg7/ardupilot that referenced this pull request Sep 12, 2024
When ArduPilot#27755 was first opened, ArduPilot#26252 had not been merged yet. ArduPilot#26252
refactored a bit, but the change was not applied to ArduPilot#27755. This commit
fixes that.

This should not change the behavior of the code.
AlexisMGL pushed a commit to AlexisMGL/ardupilot that referenced this pull request Sep 12, 2024
When ArduPilot#27755 was first opened, ArduPilot#26252 had not been merged yet. ArduPilot#26252
refactored a bit, but the change was not applied to ArduPilot#27755. This commit
fixes that.

This should not change the behavior of the code.
BloodSakura3774 pushed a commit to BloodSakura3774/ardupilot that referenced this pull request Oct 18, 2024
When ArduPilot#27755 was first opened, ArduPilot#26252 had not been merged yet. ArduPilot#26252
refactored a bit, but the change was not applied to ArduPilot#27755. This commit
fixes that.

This should not change the behavior of the code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants