Open
Conversation
…odify names motor to board
…emove remaining motor abstraction.
…rrent maps. real_world_interface.cpp: Refactored for CAN26 and the removal of base_motor abstraction.
…ored for new CAN2026
… methods for domain and uuid
…et/set Motor functions.
… to validate filter bits
…tTread/rightTread to frontTireLeft/frontTireRight/rearTireLeft/rearTireRight. Updated motormode pwm/pid to vel/pos for clarity. Add JETSON_DEVICE and MILLIDEGREES_PER_REV to constants.
…ght rather than left/right tread
… Left/Right to be assigned to motor.
…as a peripheral board. Skip non-motor boards when adding boards to motor map in real_world_interface.
…_world and FakeCANBoard.
…sing with gcc 9.1
…ut. Uses map to track device and its timer, resets timer (feed) if it gets heartbeat.
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.
Initial PR to update CAN layer of software with critical restructuring of CAN from CAN26 (most changes under /CAN repo). I kept functions that rely on HindsightCAN to allow backward compatibility, but will remove after we are able to achieve full functionality with updates. Changes also include change type name motorid_t -> boardid_t and removal of motor abstraction layers (base_motor, real_motor, sim_motor) and re-implement their functionality into their respective files (real_world_interface, FakeCANBoard, sim_interface).
Notion Doc
Copilot Summary:
"This pull request refactors the CAN interface to support the new CAN26 protocol, replacing legacy HindsightCAN types and packet handling with updated definitions and handlers. The changes modernize the codebase to work with CAN26's device UUIDs, command-based packet parsing, and new telemetry handling, while maintaining backward compatibility for some legacy functions.
Migration to CAN26 protocol:
deviceid_ttypes and HindsightCAN packet structures with CAN26'sCANDeviceUUID_t,CANDevice_t, andCANPacket_ttypes throughout the codebase, including telemetry maps, callback signatures, and function parameters. [1] [2] [3]receivePacketto extract CAN26 fields (priority, device UUID, command, sender UUID, contents) and dispatch packets based on command IDs instead of legacy packet types. [1] [2] [3]Command-specific telemetry handling:
BLDC_ENCODER_ESTIMATEandLIMIT_SWITCH_ALERT, storing telemetry using device UUID and firing callbacks with updated types.CAN socket and packet transmission:
sendCANPacketandprintCANPacketfunctions for CAN26 packets, including packet formatting and debug output; legacy versions retained for compatibility. [1] [2] [3]Header and include updates:
Backward compatibility and cleanup:
These changes collectively enable the CAN interface to operate with the CAN26 protocol and device addressing, while providing a clear migration path from legacy packet handling."