Enum Class Shooter.ShooterState
- All Implemented Interfaces:
Serializable,Comparable<Shooter.ShooterState>,Constable
- Enclosing class:
- Shooter
Enum representing the different possible states of the shooter.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionShooter doesn't run.Shooter wheels spin at a predetermined constant rate without interpolation.Shooter wheels spin at it's target RPM, interpolated based on distance to ferry zone. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DoubleSupplierThe supplier for the target RPM of the shooter in the corresponding state. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateShooterState(DoubleSupplier RPMSupplier) Constructs a ShooterState with the given supplier for the target RPM of the shooter. -
Method Summary
Modifier and TypeMethodDescriptionedu.wpi.first.units.measure.AngularVelocityGets the target angular velocity of the shooter in the corresponding state by converting the target RPM from the supplier to an AngularVelocity.static Shooter.ShooterStateReturns the enum constant of this class with the specified name.static Shooter.ShooterState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IDLE
Shooter doesn't run. -
SHOOT
Shooter wheels spin at it's target RPM, interpolated based on distance to ferry zone. -
FERRY
-
MANUAL_HUB
Shooter wheels spin at a predetermined constant rate without interpolation.
-
-
Field Details
-
RPMSupplier
The supplier for the target RPM of the shooter in the corresponding state.
-
-
Constructor Details
-
ShooterState
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
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
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 nameNullPointerException- if the argument is null
-
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
-