Class Shooter

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

    public class Shooter
    extends edu.wpi.first.wpilibj2.command.SubsystemBase
    Robot Shooter subsystem
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Shooter getInstance()
      Get the instance of Shooter
      double getOutput()  
      double getVelocityFromLimelight()  
      void handleUnjam​(boolean newState)
      Handle unjamming the power cells
      boolean isInPosition()  
      boolean isSpunUp()
      Check if the flywheel has spun up
      void periodic()  
      void setInPosition​(boolean inPosition)  
      void setOutputPercent​(double val)  
      void setVelocity​(double val)  
      void stop()  
      • 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
    • Field Detail

      • s_instance

        public static Shooter s_instance
    • Method Detail

      • getInstance

        public static Shooter getInstance()
        Get the instance of Shooter
        Returns:
        Shooter Instance
      • periodic

        public void periodic()
      • handleUnjam

        public void handleUnjam​(boolean newState)
        Handle unjamming the power cells
        Parameters:
        newState - Is this state new?
      • setOutputPercent

        public void setOutputPercent​(double val)
      • setVelocity

        public void setVelocity​(double val)
      • stop

        public void stop()
      • isSpunUp

        public boolean isSpunUp()
        Check if the flywheel has spun up
        Returns:
        Has spun up?
      • getOutput

        public double getOutput()
      • setInPosition

        public void setInPosition​(boolean inPosition)
        Parameters:
        inPosition - Is the bot in position to score?
      • isInPosition

        public boolean isInPosition()
        Returns:
        Is the bot in position to score?
      • getVelocityFromLimelight

        public double getVelocityFromLimelight()
        Returns:
        Desired flywheel velocity in RPM based on distance to target.