-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
Conversation
- 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
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.
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.
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.
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.
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.
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.