Package frc.robot.subsystems.indexer
Class Indexer
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frc.robot.subsystems.indexer.Indexer
Indexer class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidperiodic()runSpindexer(BooleanSupplier doSpin) Spin indexer if doSpin is truevoidsetMagazineDutyCycle(double dutyCycle) setSpeedCommand(double magazineDutyCycle, double spindexerDutyCycle) voidsetSpindexerDutyCycle(double dutyCycle) Spin indexer while intaking ballsMethods 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
-
-
Method Details
-
periodic
public void periodic() -
setMagazineDutyCycle
public void setMagazineDutyCycle(double dutyCycle) -
setSpindexerDutyCycle
public void setSpindexerDutyCycle(double dutyCycle) -
setSpeedCommand
- Parameters:
magazineDutyCycle- power value from (-1) to 1spindexerDutyCycle- power value from (-1) to 1- Returns:
- command to set speed of indexer and spinner
-
runSpindexer
Spin indexer if doSpin is true -
spinWhileIntake
Spin indexer while intaking balls- Returns:
- Command
-