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

esc_report: change esc_temperature field to allow negative values [needs mavlink submodule update] #18108

Merged
merged 1 commit into from
Sep 11, 2021

Conversation

cmic0
Copy link
Contributor

@cmic0 cmic0 commented Aug 19, 2021

Title is self explanatory. This PR needs to go in after the relative mavlink message is updated, mavlink/mavlink#1663.

@dagar i've also noticed that the UAVCAN spec defines the temperature in Kelvin for uavcan.equipment.esc.Status (https://legacy.uavcan.org/Specification/7._List_of_standard_data_types/), looking at the code we've always filled the esc_temperature directly from the UAVCAN message.. not sure who to trust there :|

@cmic0 cmic0 requested review from dagar and bkueng August 19, 2021 12:46
@dagar
Copy link
Member

dagar commented Aug 19, 2021

not sure who to trust there

Trust no one, but let's default to the spec and handle special cases if necessary.

@@ -3,7 +3,7 @@ uint32 esc_errorcount # Number of reported errors by ESC - if supported
int32 esc_rpm # Motor RPM, negative for reverse rotation [RPM] - if supported
float32 esc_voltage # Voltage measured from current ESC [V] - if supported
float32 esc_current # Current measured from current ESC [A] - if supported
uint8 esc_temperature # Temperature measured from current ESC [degC] - if supported
int16 esc_temperature # Temperature measured from current ESC [centiDegC] - if supported
Copy link
Member

Choose a reason for hiding this comment

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

Can we keep this SI at the uORB level? Using a float32 is fine unless you think int8 is sufficient (127 C max might not be quite enough for ESCs).

@cmic0 cmic0 force-pushed the pr-esc-negative-temp branch 2 times, most recently from bfb8fb5 to fb4d859 Compare August 31, 2021 12:14
@cmic0
Copy link
Contributor Author

cmic0 commented Aug 31, 2021

mavlink/mavlink#1663 has been merged, i've updated this PR to use degC @dagar

Signed-off-by: Claudio Micheli <claudio@auterion.com>
@cmic0 cmic0 changed the title [Don't merge yet] esc_report: change esc_temperature field to allow negative values esc_report: change esc_temperature field to allow negative values [needs mavlink submodule update] Sep 2, 2021
@dagar dagar merged commit fa4fc5f into master Sep 11, 2021
@dagar dagar deleted the pr-esc-negative-temp branch September 11, 2021 19:14
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.

3 participants