Repository navigation
Reusable electrical report exporter and @ReadyWhen - #692
Merged
Merged
Conversation
- @ReadyWhen("Name") tags a contract getter with the hardware it belongs to. - XElectricalReportContract: isReady/getHardwareNames plus optional wiring lists (CAN order, extra PDH loads, power branches) for the report. - xbot.common.electrical.report.ElectricalReport: text report and JSON snapshots for the electrical contract web tool; --all -d DIR writes every robot plus index.json. Moved from TeamXbot2026 and generalised (CAN buses taken from the devices, no RIO bus). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018WRhH1b6vqCkLNMXaAbvnp
…ctor Migrate electrical report DeviceInfo usages to record accessors, update test contracts to fluent descriptor builders, and apply the new Spotless formatting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 775680b9-d2ff-4c9c-9ede-3a01e371e54a
Integrate upstream finite-state-machine changes. Run Spotless across the repository; no additional formatting changes were needed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 775680b9-d2ff-4c9c-9ede-3a01e371e54a
stephenjust
enabled auto-merge (squash)
November 9, 2026 01:59
stephenjust
approved these changes
Nov 9, 2026
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.
Moves the electrical report exporter from TeamXbot2026 into the library so every season repo (starting with 2027 from FRCRobotTemplate) gets it without copying.
Adds
@ReadyWhen("Name")(xbot.common.injection.electrical_contract): tags a contract getter with the hardware it belongs to, so the report leaves out devices whose mechanism isn't on the robot.XElectricalReportContract:isReady(String),getHardwareNames()(catches typos in@ReadyWhen),CanBusOrderEntry, and optional default methods for CAN order, extra PDH loads and power branches.xbot.common.electrical.report.ElectricalReport: text report and JSON snapshots for the electrical contract web tool (Team488/electrical-contract-web).run(args, contracts)takes a map of robot name → contract;--all -d DIRwrites every robot plusindex.json.ElectricalReportTest: 8 tests (readiness filter, typo rejection, defined-in tracking, wiring lists only from a robot's own class, I/O sorting, JSON and text output,--all).Changes from the 2026 version: CAN buses come from the devices (
can_s0–can_s4, Canivore) since there's no RIO bus; minimal built-in JSON writer, no new dependency.Notes for reviewers
DeviceInfois still sorted into DIO/PWM by naming convention (TODO(SystemCore)): a port-type field onDeviceInfowould remove the guesswork.maindoesn't compile against this library'smainsince Refactor DevicePolice reservations and migrate SystemCore addressing #688 (CANBusId.RIO,DeviceInfosim-scaling constructor). Unrelated to this PR; I verified the template PR against the library at Migrate from JUnit 4 to JUnit 5 #684 (its pinned 20261010.5) plus these files.Companion PR: Team488/FRCRobotTemplate#96 (draft).
🤖 Generated with Claude Code
https://claude.ai/code/session_018WRhH1b6vqCkLNMXaAbvnp