Unexplained byte LSL operation for CRC calculation in nusense's dynamixel packetiser.decode() method
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 4
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/NUbots/NUcontroller/blob/main/NUSense/Core/Src/dynamixel/Packetiser.hpp
line 117-118, the read byte is LSL'ed then is put in the packetiser's buffer member. I assumed / expected it to be at least put in the buffer first before being LSL'ed for the length calculation. I tried this with opencr and as expected we encountered a CRC mismatch but for some reason it works with nusense. I believe it must be investigated and explained to prevent ourselves from going insane down the line.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with NUSense/Core/Src/dynamixel/Packetiser.hpp, especially lines 117-118 in the decode() method. Trace how the read byte is shifted, stored in the buffer, and used for CRC length calculation, then compare the behavior with the OpenCR path mentioned in the issue. Done means the byte ordering and CRC behavior are explained and any mismatch is resolved or documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100