Class CellSuperstructure

  • All Implemented Interfaces:
    edu.wpi.first.wpilibj.Sendable, edu.wpi.first.wpilibj2.command.Subsystem

    public class CellSuperstructure
    extends edu.wpi.first.wpilibj2.command.SubsystemBase
    The CellSuperstructure is the overarching subsystem and state machine in charge of managing the intake, sorting, and shooting of balls. This class should be called by other parts of the codebase, and will pass commands along to it's sub-subsystems. Do not call the sub-subsystems independently.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static CellSuperstructure getInstance()
      Get the CellSuperstructure instance
      void intakeCells​(int amount)
      Set the subsystems to intake an amount of cells
      boolean isDone()  
      boolean isDoneIntake()  
      void moveToBottom()  
      void periodic()  
      void shootCells​(int amount)
      Set the subsystems to shoot an amount of cells
      void stop()
      Set the subsystems to stop
      void unjam()
      Set the subsystems to unjam
      void unjamUp()
      Set the subsystems to unjam up
      • Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase

        addChild, getName, getSubsystem, initSendable, setName, setSubsystem
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface edu.wpi.first.wpilibj.Sendable

        addChild, setName, setName, setName
      • Methods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem

        getCurrentCommand, getDefaultCommand, register, setDefaultCommand
    • Method Detail

      • periodic

        public void periodic()
      • isDone

        public boolean isDone()
        Returns:
        wether or not the superStructure has completed it's actions (if it is idle or not)
      • isDoneIntake

        public boolean isDoneIntake()
        Returns:
        wether or not the superStructure has completed intake
      • moveToBottom

        public void moveToBottom()
      • shootCells

        public void shootCells​(int amount)
        Set the subsystems to shoot an amount of cells
        Parameters:
        amount - amount of cells the subsystems should try to shoot
      • intakeCells

        public void intakeCells​(int amount)
        Set the subsystems to intake an amount of cells
        Parameters:
        amount - amount of cells we want to be holding by the end of the action
      • stop

        public void stop()
        Set the subsystems to stop
      • unjam

        public void unjam()
        Set the subsystems to unjam
      • unjamUp

        public void unjamUp()
        Set the subsystems to unjam up