Package frc.robot.subsystems.indexer
Class Indexer
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frc.robot.subsystems.indexer.Indexer
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.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears all faults and warnings.booleanReturns whether or not the subsystem is healthyvoidperiodic()Updates hardware inputs, logs data, and updates status alerts.run()Returns a command to run the indexer while the command is held.voidsetGoal(Indexer.Goal goal) Sets the current goal for the indexer.startRun()Returns a command to start running the indexer.stop()Returns a command to stop the indexer.Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, idle, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd, startRun
-
Constructor Details
-
Indexer
Creates a new Indexer subsystem.- Parameters:
io- The abstraction layer for the indexer hardware.
-
-
Method Details
-
setGoal
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. -
run
Returns a command to run the indexer while the command is held.- Returns:
- The run command.
-
startRun
Returns a command to start running the indexer.- Returns:
- The start run 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 -
clearFaults
public void clearFaults()Clears all faults and warnings.- Specified by:
clearFaultsin interfaceMonitored
-