Skip to content

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented May 23, 2025

Solved Problem

When looking at a log that was captured on a drone with Holybro Kotleta20 ESCs attached through CAN I found that the reported temperatures are unreasonably high:
image

Then I realized the temperature field definitions of UAVCAN:
float16 temperature # Kelvin
and uORB:
float32 esc_temperature # Temperature measured from current ESC [degC] - if supported

but there's no conversion:

ref.esc_temperature = msg.temperature;

Solution

Add a conversion from degree Kelvin to Celsius.

Changelog Entry

Fix temperature conversion from UAVCAN to uORB ESC status

Test coverage

I did not test this yet.

@MaEtUgR MaEtUgR requested a review from RomanBapst May 23, 2025 15:03
@MaEtUgR MaEtUgR self-assigned this May 23, 2025
sfuhrer
sfuhrer previously approved these changes May 26, 2025
Copy link
Contributor

@sfuhrer sfuhrer left a comment

Choose a reason for hiding this comment

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

Good catch.

@MaEtUgR MaEtUgR force-pushed the maetugr/uavcan-motor-temperature-conversion branch from e9b8c39 to 72a8684 Compare June 4, 2025 14:43
@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jun 4, 2025

I replaced the hardcoded value with the already existing constant.

@MaEtUgR MaEtUgR merged commit 7e05565 into main Jun 4, 2025
34 of 37 checks passed
@MaEtUgR MaEtUgR deleted the maetugr/uavcan-motor-temperature-conversion branch June 4, 2025 14:44
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.

2 participants