Rather than wiring pilot buttons directly to individual mechanism commands, the 2026 robot uses a level of indirection: every significant robot action is represented as a namedDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/spectrum3847/2026-Spectrum/llms.txt
Use this file to discover all available pages before exploring further.
State, a trigger in RobotStates transitions the robot into that state, and Coordinator fans the state out to simultaneous commands on every affected subsystem. This keeps pilot bindings, robot strategy, and hardware commands in three separate, independently editable places.
The State enum
State.java defines every high-level mode the robot can be in as a plain Java enum. These values are passed to Coordinator.applyRobotState() and stored in RobotStates.appliedState for telemetry:
TRACK_TARGET knows its natural next state is LAUNCH_WITH_SQUEEZE — and exposes an isReady() predicate that other systems can poll:
Coordinator: simultaneous cross-subsystem commands
Coordinator.applyRobotState() is the single method that translates a State into commands for every involved subsystem. Each case block calls static command schedulers on the relevant *States classes:
RobotStates: binding triggers to states
RobotStates.setupStates() is called every time the robot enters a new match phase. It wires WPILib Trigger objects — gamepad buttons, zone predicates, autonomous event flags — to applyState() commands:
applyState() is a Commands.runOnce wrapper that updates appliedState and calls the coordinator atomically:
appliedState is logged every robot period and is visible in AdvantageScope under the Applied State key.
The INTAKE_FUEL state chain: end-to-end example
Pilot presses right trigger
pilot.RT becomes true. The binding checks that pilot.LT is not also pressed, then schedules applyState(State.INTAKE_FUEL).RobotStates.applyState runs
appliedState is set to INTAKE_FUEL and coordinator.applyRobotState(State.INTAKE_FUEL) is called in the same runOnce lambda.Coordinator fans out commands
In the same scheduler tick, the coordinator schedules:
FuelIntakeStates.intakeFuel()— runs the intake rollersIndexerBedStates.slowIndex()— slowly pulls fuel toward the towerIntakeExtensionStates.fullExtend()— deploys the intake armLauncherStates.idlePrep()— spins the launcher to a low ready RPMHoodStates.home()— keeps the hood retractedIndexerTowerStates.neutral()— tower stays idle
Zone-based triggers
RobotStates also declares field-position triggers derived from swerve odometry. These can gate behavior without any explicit pilot input:
.and(), .or(), and .negate() chaining to express complex multi-condition behaviors without imperative if-statements.
State telemetry
Every trigger binding that logs a meaningful signal uses a helper to keep DogLog entries in sync:setupStates() is called once per mode transition, not every loop. If you add a new trigger binding you must call it inside setupStates() or RobotStates.setupStates() — bindings added outside these methods will not survive a mode reset.State reference
Teleop states
Teleop states
| State | Description |
|---|---|
IDLE | All mechanisms neutral or at home. Default between actions. |
INTAKE_FUEL | Deploys intake arm, runs intake and slow indexer bed. |
SNAKE_INTAKE | Alternate intake path. |
TRACK_TARGET | Launcher and hood aim at target; swerve may rotate to assist. |
TRACK_TARGET_WITH_NO_SWERVE | Same as TRACK_TARGET but swerve is not commanded to rotate. |
LAUNCH_WITH_SQUEEZE | Full launch sequence — intake runs, indexer at max, launcher aimed, intake retracts with delay. |
LAUNCH_WITH_SQUEEZE_WITH_NO_DELAY | Same as above but intake retracts immediately. |
LAUNCH_WITHOUT_SQUEEZE | Full launch without retracting the intake extension. |
UNJAM | Reverses indexer and bed to clear jammed fuel. |
FORCE_HOME | Fully retracts intake extension; all other mechanisms neutral. |
CUSTOM_SPEED_TURRET_LAUNCH | Launches at a tunable custom speed, hood aimed. |
Autonomous states
Autonomous states
| State | Description |
|---|---|
AUTON_TRACK_TARGET | Aim at target using autonomous-specific PID tuning. |
AUTON_LAUNCH_WITH_SQUEEZE | Launch sequence using autonomous-specific PID tuning. |
Utility and test states
Utility and test states
| State | Description |
|---|---|
COAST | Sets intake extension and hood to coast neutral mode. |
BRAKE | Sets intake extension and hood to brake neutral mode. |
TEST_INFINITE_LAUNCH | Continuously cycles fuel through all stages at slow speed for tuning. |
TEST_IDLE | Stops everything; used to exit TEST_INFINITE_LAUNCH. |
