Skip to content

[DRAFT] Auto register all devices#636

Draft
aschokking wants to merge 15 commits into
mainfrom
auto-register-all-devices
Draft

[DRAFT] Auto register all devices#636
aschokking wants to merge 15 commits into
mainfrom
auto-register-all-devices

Conversation

@aschokking

Copy link
Copy Markdown
Contributor

Why are we doing this?

Whats changing?

Questions/notes for reviewers

How this was tested

  • unit tests added
  • tested on robot

aschokking and others added 3 commits June 25, 2026 19:57
…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>
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 this pull request may close these issues.

2 participants