-
Notifications
You must be signed in to change notification settings - Fork 15k
UAVCAN: fix and improve device_id logic #26135
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
Conversation
|
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: |
6d0c478 to
46a8dd8
Compare
067d165 to
6fc57a7
Compare
|
@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. |
dakejahl
left a comment
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.
Looking good! Stoked about this, thank you!
Co-authored-by: Matthias Grob <[email protected]>
Co-authored-by: Øyvind Taksdal Stubhaug <[email protected]>
6fc57a7 to
0ce1bbf
Compare
46a8dd8 to
f8a9b12
Compare
|
CI failure is real, otherwise LGTM |
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: 376 byte (0.02 %)]px4_fmu-v6x [Total VM Diff: 384 byte (0.02 %)]Updated: 2026-01-06T18:13:22 |
8b6f708 to
9e5802f
Compare
|
@dakejahl yea this was intended, as i needed to get the other PR over the line faster than this, and these changes were dependent on the other changes. |
* UAVCAN: extent SENS_GPS_PRIME usage to UAVCAN GNSS devices * use convenience function Co-authored-by: Matthias Grob <[email protected]> * Update src/drivers/uavcan/sensors/gnss.cpp Co-authored-by: Øyvind Taksdal Stubhaug <[email protected]> * Apply suggestion from @MaEtUgR Co-authored-by: Matthias Grob <[email protected]> * Fix type casting in GPS prime range check * reverted parameter default * UAVCAN: fix and improve device_id logic (#26135) * UAVCAN: extent SENS_GPS_PRIME usage to UAVCAN GNSS devices * use convenience function Co-authored-by: Matthias Grob <[email protected]> * Update src/drivers/uavcan/sensors/gnss.cpp Co-authored-by: Øyvind Taksdal Stubhaug <[email protected]> * Apply suggestion from @MaEtUgR Co-authored-by: Matthias Grob <[email protected]> * Fix type casting in GPS prime range check * UAVCAN: fix and improve device_id logic * Added bus information to more UAVCAN drivers * Fix device_id registration in UavcanBarometerBridge --------- Co-authored-by: Matthias Grob <[email protected]> Co-authored-by: Øyvind Taksdal Stubhaug <[email protected]> Co-authored-by: Jacob Dahl <[email protected]> --------- Co-authored-by: Matthias Grob <[email protected]> Co-authored-by: Øyvind Taksdal Stubhaug <[email protected]> Co-authored-by: Jacob Dahl <[email protected]>
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