Enum Class Feeder.FeederState
- All Implemented Interfaces:
Serializable,Comparable<Feeder.FeederState>,Constable
- Enclosing class:
- Feeder
Enum representing the different possible states of the feeder.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate edu.wpi.first.units.measure.VoltageThe target voltage of the feeder motors. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateFeederState(edu.wpi.first.units.measure.Voltage targetVoltage) Constructs a FeederState with the given target voltage. -
Method Summary
Modifier and TypeMethodDescriptionedu.wpi.first.units.measure.VoltageGets the target voltage of the feeder motors in the corresponding state.static Feeder.FeederStateReturns the enum constant of this class with the specified name.static Feeder.FeederState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IDLE
Feeder is stopped. -
FORWARD
Motors run forward to feed to the shooter. -
REVERSE
Motors run backward to work with the intake to outtake fuel from the robot.
-
-
Field Details
-
targetVoltage
The target voltage of the feeder motors.
-
-
Constructor Details
-
FeederState
Constructs a FeederState with the given target voltage.- Parameters:
targetVoltage- the target voltage of the feeder motors 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
-
getTargetVoltage
Gets the target voltage of the feeder motors in the corresponding state.- Returns:
- the target voltage of the feeder motors
-