Enum Class Intake.IntakeState
- All Implemented Interfaces:
Serializable,Comparable<Intake.IntakeState>,Constable
- Enclosing class:
- Intake
Enum representing the different possible states of the intake.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe intake is brought up repeatedly to an angle between stowed and deployed to dislodge gamepieces.The intake is brought up once to an angle between stowed and deployed to dislodge gamepieces.The intake is deployed but rollers are off.The intake is pushed against the bumpers to re-zero the pivot.The intake is stowed and rollers are off.The intake is deployed and rollers are running to take in gamepieces.The intake is deployed and rollers are running in reverse to expel gamepieces. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate edu.wpi.first.units.measure.AngleThe target angle of the intake pivot.private doubleThe target percentage of voltage of the intake rollers. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateIntakeState(edu.wpi.first.units.measure.Angle targetAngle, double targetDutyCycle) Constructs an IntakeState with its target values. -
Method Summary
Modifier and TypeMethodDescriptionedu.wpi.first.units.measure.AngleGets the target position of the pivot.doubleGets the target position of the pivot.static Intake.IntakeStateReturns the enum constant of this class with the specified name.static Intake.IntakeState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AGITATE_DOWN
-
IDLE
The intake is stowed and rollers are off. -
DOWN
The intake is deployed but rollers are off. -
INTAKE
The intake is deployed and rollers are running to take in gamepieces. -
OUTTAKE
The intake is deployed and rollers are running in reverse to expel gamepieces. -
AGITATE
The intake is brought up repeatedly to an angle between stowed and deployed to dislodge gamepieces. Rollers do not run. -
DIGEST
The intake is brought up once to an angle between stowed and deployed to dislodge gamepieces. Rollers do not run. -
HOMING_DOWN
The intake is pushed against the bumpers to re-zero the pivot.
-
-
Field Details
-
targetAngle
The target angle of the intake pivot. -
targetDutyCycle
The target percentage of voltage of the intake rollers.
-
-
Constructor Details
-
IntakeState
Constructs an IntakeState with its target values.- Parameters:
targetAngle- In any unit, the target position of the intake pivottargetDutyCycle- In any unit, the target percentage of voltage of the intake rollers
-
-
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
-
getTargetAngle
Gets the target position of the pivot.- Returns:
- the target angle
-
getTargetDutyCycle
Gets the target position of the pivot.- Returns:
- the target percentage of voltage of the intake rollers
-