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:
Launch integration
The indexer is gated behindlauncherSubsystem.isAtTarget() in the launching command chain in Controls.java. Fuel is not fed until flywheels, hood, and turret are all within tolerance:
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.