Skip to main content
The indexer moves fuel from the intake staging area into the launcher using two motors: a Feeder that pushes fuel along the exit path, and a Spindexer that spins fuel into the feed zone. Both are wrapped by IndexerSubsystem, which exposes a single runIndexer() command used by the launching sequence.

Components

Feeder

Feeder drives a single TalonFX (CAN ID FEEDER_MOTOR_ID = 30) on the CANivore bus (comp bot) or roboRIO bus (alpha bot) using VelocityVoltage control.

Spindexer

Spindexer drives a single TalonFX (CAN ID SPINDEXER_MOTOR_ID = 31) on the roboRIO bus using VelocityVoltage control.

IndexerSubsystem API

IndexerSubsystem exposes two variants of runIndexer():

runIndexer() — fixed velocity

Runs both motors at their default configured velocities.

runIndexer(DoubleSupplier flywheelRPS) — flywheel-matched velocity

Scales feeder and spindexer velocity to match the active flywheel speed for a smooth handoff. The linear equations provide proportional ramping:
The spindexer is capped at 70 RPS regardless of flywheel speed to prevent over-spinning.

Launch integration

The indexer is gated behind launcherSubsystem.isAtTarget() in the launching command chain in Controls.java. Fuel is not fed until flywheels, hood, and turret are all within tolerance:
If the launcher drops out of tolerance mid-cycle (e.g. the robot is bumped), onlyWhile() cancels the indexer automatically and the loop waits for re-acquisition.

Controller binding

The indexer only instantiates if both SPINDEXER_ENABLED and FEEDER_ENABLED are true in Subsystems.java. Controls.java checks for null subsystems and logs a warning if either component is disabled, skipping all indexer bindings.