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.SubsystemBase
Robot hopper subsystem
-
-
Field Summary
Fields Modifier and Type Field Description static Hopper
s_instance
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
forceCellCount(int count)
Force-override the internal power cell counterint
getCellCount()
static Hopper
getInstance()
Get the instance of Hopperboolean
getTopLineBreak()
void
interruptShooting()
Stop shooting and get remaining cells back to the bottomboolean
isDone()
void
manuallyControlBelt(double speed)
manually control the beltvoid
modifyCellCount(int changeAmount)
void
moveCellsToBottom()
moves cells to bottomvoid
periodic()
void
startIntake()
Set the hopper to intakevoid
startRumble()
void
stop()
Stop the hoppervoid
supplyCellsToShooter()
Supply cells to shooter until there are none leftboolean
topLineBreakState()
void
unjam()
Set the hopper to unjamvoid
unjamUp()
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]
-
-