Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@Claudio-Chies
Copy link
Member

Fixes device ID handling in UAVCAN bridges.

Solution

Refactor device ID logic across multiple UAVCAN sensor bridges to use a unified method for generating device IDs.

Changelog Entry

Bugfix: Improved device ID logic for UAVCAN sensors.

Test coverage

-[ ] open, didnt have the time yet.

@oystub
Copy link
Contributor

oystub commented Dec 17, 2025

Nice, I like doing this properly!

However, note that some of the bridges that haven't been modified still leave the bus id as 0, for example rangefinder. Up until now, the "convention" has been to just leave bus id as 0 for everything DroneCAN. If we change that, we should be careful to update it everywhere.

There is also some discussion if we actually want to separate DroneCAN buses, or treat them as as one large network. (Are two devices with the same DroneCAN ID on two different buses considered the "same" device, or two different ones?)

I did something similar in an old draft, but haven't followed it up properly:
#22880

src/drivers/uavcan/sensors/sensor_bridge.hpp Outdated Show resolved Hide resolved
@MaEtUgR
Copy link
Member

MaEtUgR commented Dec 17, 2025

This pr is related to #26126

@oystub Nice, thanks for chiming in. Let's combine these two changes and bring in consistent Device IDs for UAVCAN 👍

@Claudio-Chies
Copy link
Member Author

Took inspiration from #22880, and expanded it to more drivers, thanks @oystub

@dakejahl
Copy link
Contributor

@Claudio-Chies looks like there are some merge conflicts. Also try to avoid force pushing after review has started (if possible), it makes it difficult for reviewers to see what has changed between commits.

Copy link
Contributor

@dakejahl dakejahl left a comment

Choose a reason for hiding this comment

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

Looking good! Stoked about this, thank you!

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.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.