Class Indexer

All Implemented Interfaces:
Sendable, Subsystem, Monitored

public class Indexer extends SubsystemBase implements Monitored
Subsystem for the robot's indexer mechanism.

Responsible for controlling the speed of the motor driving the indexer to transfer game pieces from the intake to the shooter.

  • Constructor Details

    • Indexer

      public Indexer(IndexerIO io)
      Creates a new Indexer subsystem.
      Parameters:
      io - The abstraction layer for the indexer hardware.
  • Method Details

    • setGoal

      public void setGoal(Indexer.Goal goal)
      Sets the current goal for the indexer.
      Parameters:
      goal - The target goal.
    • periodic

      public void periodic()
      Updates hardware inputs, logs data, and updates status alerts.
      Specified by:
      periodic in interface Subsystem
    • run

      public Command run()
      Returns a command to run the indexer while the command is held.
      Returns:
      The run command.
    • startRun

      public Command startRun()
      Returns a command to start running the indexer.
      Returns:
      The start run command.
    • stop

      public Command stop()
      Returns a command to stop the indexer.
      Returns:
      The stop command.
    • isHealthy

      public boolean isHealthy()
      Returns whether or not the subsystem is healthy
      Specified by:
      isHealthy in interface Monitored
      Returns:
      True if the subsystem is healthy, false otherwise.
    • clearFaults

      public void clearFaults()
      Clears all faults and warnings.
      Specified by:
      clearFaults in interface Monitored