Skip to content
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

Incorrect CAN ID or API ID for heartbeat #2241

Closed
grnnja opened this issue Apr 6, 2023 · 2 comments · Fixed by #2270
Closed

Incorrect CAN ID or API ID for heartbeat #2241

grnnja opened this issue Apr 6, 2023 · 2 comments · Fixed by #2270

Comments

@grnnja
Copy link

grnnja commented Apr 6, 2023

The roboRIO provides a universal CAN heartbeat that any device on the bus can listen and react to. This heartbeat is sent every 20ms. The heartbeat has a full CAN ID of ``0x01011840`` (which is the NI Manufacturer ID, RobotController type, Device ID 0 and API ID ``0x062``). It is an 8 byte CAN packet. The important byte in here is byte 5 (index 4). The layout is the following bitfield.

Here it says the CAN ID for the heartbeat is: 0x01011840 and the api id is 0x062

if you convert the CAN ID to binary and pad to 29 bits you get: 00001000000010001100001000000

breaking up into device type(5 bits), manufacturer(8 bits), api id(10 bits) and device id(6 bits): 00001 00000001 0001100001 000000

So the api id is 0001100001

converting back to hex we get 0x061 which is not equal to 0x062.

@Daltz333
Copy link
Member

Pinging @ThadHouse

@ThadHouse
Copy link
Member

The full arbitration id is correct, and the API ID is 0x61. So the API ID needs to be fixed in the docs.

calcmogul added a commit to calcmogul/frc-docs that referenced this issue Jun 9, 2023
Daltz333 pushed a commit that referenced this issue Jun 9, 2023
pjbuterbaugh pushed a commit to pjbuterbaugh/frc-docs that referenced this issue Jul 25, 2023
guineawheek pushed a commit to guineawheek/frc-docs that referenced this issue Aug 2, 2023
pjbuterbaugh pushed a commit to pjbuterbaugh/frc-docs that referenced this issue Sep 17, 2023
pjbuterbaugh pushed a commit to pjbuterbaugh/frc-docs that referenced this issue Oct 29, 2023
pjbuterbaugh pushed a commit to pjbuterbaugh/frc-docs that referenced this issue Oct 29, 2023
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 a pull request may close this issue.

3 participants