Enum Class Shooter.ShooterState

java.lang.Object
java.lang.Enum<Shooter.ShooterState>
com.stuypulse.robot.subsystems.shooter.Shooter.ShooterState
All Implemented Interfaces:
Serializable, Comparable<Shooter.ShooterState>, Constable
Enclosing class:
Shooter

public static enum Shooter.ShooterState extends Enum<Shooter.ShooterState>
Enum representing the different possible states of the shooter.
  • Enum Constant Details

  • Field Details

    • RPMSupplier

      The supplier for the target RPM of the shooter in the corresponding state.
  • Constructor Details

    • ShooterState

      private ShooterState(DoubleSupplier RPMSupplier)
      Constructs a ShooterState with the given supplier for the target RPM of the shooter.
      Parameters:
      RPMSupplier - the supplier for the target RPM of the shooter in the corresponding state
  • Method Details

    • values

      public static Shooter.ShooterState[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Shooter.ShooterState valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getTargetAngularVelocity

      public edu.wpi.first.units.measure.AngularVelocity getTargetAngularVelocity()
      Gets the target angular velocity of the shooter in the corresponding state by converting the target RPM from the supplier to an AngularVelocity.
      Returns:
      the target angular velocity of the shooter