[DRAFT] Auto register all devices#636
Draft
aschokking wants to merge 15 commits into
Draft
Conversation
Only did canmotor controlers and servos so far
2 tasks
…ices # Conflicts: # src/main/java/xbot/common/controls/actuators/XCANMotorController.java # src/main/java/xbot/common/controls/actuators/mock_adapters/MockCANMotorController.java # src/main/java/xbot/common/controls/actuators/wpi_adapters/CANSparkMaxWpiAdapter.java # src/main/java/xbot/common/controls/actuators/wpi_adapters/CANTalonFxWpiAdapter.java # src/main/java/xbot/common/controls/actuators/wpi_adapters/CANVictorSPXWpiAdapter.java
…tion BaseSwerveDriveSubsystem (and the SwerveModuleSubsystem/SwerveSteeringSubsystem chain it drives) implemented DataFrameRefreshable but had no path to ever be invoked once BaseSubsystem.registerDataFrameRefreshable() was removed in favor of self-registering devices - its refreshDataFrame() was silently dead code, so swerve module odometry/state never updated. It now self-registers with DataFrameRegistry like every device class does, and the now-unused BaseRobot.dataFrameRefreshables list/loop is removed. Added a regression test that fails without the fix. Also centralizes XGyro's DataFrameRegistry registration into its own base constructor instead of duplicating it across MockGyro/Pigeon2Adapter/ InertialMeasurementUnitAdapter, which incidentally fixes InertialMeasurement- UnitAdapter never registering when AHRS construction throws. Plus small cleanup: stray unused import, dead commented-out code, and DataFrameRegistry's dedupe switched from a List.contains() scan to a LinkedHashSet. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Why are we doing this?
Whats changing?
Questions/notes for reviewers
How this was tested