Repository navigation
UAVCAN: use uavcan_esc_index + 1 for motor 2 on dual motor hardware - #991
Merged
Merged
Conversation
On HW_HAS_DUAL_MOTORS hardware motor 1 takes the ESC RawCommand and RPMCommand entry at uavcan_esc_index and motor 2 the entry at uavcan_esc_index + 1. An ESC Status message is sent for each motor with the matching esc_index. The motor selected by the calling thread is restored afterwards. Single motor hardware is unchanged.
Jfriesen222
force-pushed
the
uavcan-dual-motor-esc-index
branch
from
December 3, 2026 04:09
30bddc4 to
3d0c595
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UAVCAN support for dual motor hardware (Duet, Duet XS, Stormcore 60D/100D etc.). Motor 1 uses uavcan_esc_index and motor 2 uses uavcan_esc_index + 1.
Note that motor 2 was not driven over UAVCAN before, so existing dual setups where esc_index + 1 belongs to another ESC need a new index.
Builds for duet and 60_mk6. Tested the handlers on the host with and without HW_HAS_DUAL_MOTORS, not on hardware.