Package frc.robot.subsystems.cellmech
Class Hopper
- java.lang.Object
-
- edu.wpi.first.wpilibj2.command.SubsystemBase
-
- frc.robot.subsystems.cellmech.Hopper
-
- All Implemented Interfaces:
edu.wpi.first.wpilibj.Sendable,edu.wpi.first.wpilibj2.command.Subsystem
public class Hopper extends edu.wpi.first.wpilibj2.command.SubsystemBaseRobot hopper subsystem
-
-
Field Summary
Fields Modifier and Type Field Description static Hoppers_instance
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidforceCellCount(int count)Force-override the internal power cell counterintgetCellCount()static HoppergetInstance()Get the instance of HopperbooleangetTopLineBreak()voidinterruptShooting()Stop shooting and get remaining cells back to the bottombooleanisDone()voidmanuallyControlBelt(double speed)manually control the beltvoidmodifyCellCount(int changeAmount)voidmoveCellsToBottom()moves cells to bottomvoidperiodic()voidstartIntake()Set the hopper to intakevoidstartRumble()voidstop()Stop the hoppervoidsupplyCellsToShooter()Supply cells to shooter until there are none leftbooleantopLineBreakState()voidunjam()Set the hopper to unjamvoidunjamUp()Set the hopper to unjam up-
Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystem
-
-
-
-
Field Detail
-
s_instance
public static Hopper s_instance
-
-
Method Detail
-
getInstance
public static Hopper getInstance()
Get the instance of Hopper- Returns:
- Hopper Instance
-
periodic
public void periodic()
-
getTopLineBreak
public boolean getTopLineBreak()
- Returns:
- state of the top line break sensor
-
getCellCount
public int getCellCount()
- Returns:
- current amount of cells in the hopper
-
modifyCellCount
public void modifyCellCount(int changeAmount)
- Parameters:
changeAmount- amount to increase or decrease the cell count by
-
startRumble
public void startRumble()
-
isDone
public boolean isDone()
- Returns:
- wether or not the hopper has completed it's actions (if it is idle or not)
-
topLineBreakState
public boolean topLineBreakState()
- Returns:
- state of the top line break sensor
-
interruptShooting
public void interruptShooting()
Stop shooting and get remaining cells back to the bottom
-
supplyCellsToShooter
public void supplyCellsToShooter()
Supply cells to shooter until there are none left
-
unjam
public void unjam()
Set the hopper to unjam
-
unjamUp
public void unjamUp()
Set the hopper to unjam up
-
startIntake
public void startIntake()
Set the hopper to intake
-
stop
public void stop()
Stop the hopper
-
moveCellsToBottom
public void moveCellsToBottom()
moves cells to bottom
-
manuallyControlBelt
public void manuallyControlBelt(double speed)
manually control the belt- Parameters:
speed- speed to set the belt to
-
forceCellCount
public void forceCellCount(int count)
Force-override the internal power cell counter- Parameters:
count- New cell count [0-5]
-
-