Package frc.robot.superstructure
Enum Class ShooterSuperstructure.ShooterState
java.lang.Object
java.lang.Enum<ShooterSuperstructure.ShooterState>
frc.robot.superstructure.ShooterSuperstructure.ShooterState
- All Implemented Interfaces:
Serializable,Comparable<ShooterSuperstructure.ShooterState>,Constable
- Enclosing class:
- ShooterSuperstructure
public static enum ShooterSuperstructure.ShooterState
extends Enum<ShooterSuperstructure.ShooterState>
The list of states the shooter can be in.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionHomed and waiting for a target.Currently under manual control.Stopped.The shooter has a target and is in some stage of shooting.We wereshooting, but for whatever reason we had to stop to wait on a mechanism to ready (maybe the turret reached a limit and had to wrap around).Currently tracking and shooting at a target.Has target, waiting for things to ready.Initialized and ready to shoot.Various stages related to active shooting (at this point, control is completely automatic).Waiting for the hood and uptake to ready, since we only spin those while actively shooting. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static ShooterSuperstructure.ShooterState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OFF
Stopped. This won't automatically transition into any other states. -
HOME
Homed and waiting for a target.If a target is given by the current source, this will automatically transition to
SHOOTING. -
MANUAL_CONTROL
Currently under manual control. -
SHOOTING
The shooter has a target and is in some stage of shooting. We never transition directly to this state, only substates of it. -
SHOOTING_STAGE_1_INITIALIZING
Has target, waiting for things to ready. Substate ofSHOOTING.Once the subsystems are all ready, this will automatically transition to
SHOOTING_STAGE_2_READY_TO_SHOOT. -
SHOOTING_STAGE_2_READY_TO_SHOOT
Initialized and ready to shoot. Waiting forShooterSuperstructure.ShooterTrigger.START_SHOOTING. -
SHOOTING_STAGE_3_SHOOTING
Various stages related to active shooting (at this point, control is completely automatic).Once the hopper is out of balls (defined as when the hopper beam break hasn't detected a ball for
Constants.ShootingConstants.SHOOTING_TIMEOUT), this will automatically transition back toHOMEstate. -
SHOOTING_WAITING
Waiting for the hood and uptake to ready, since we only spin those while actively shooting. This is a substate ofSHOOTING_STAGE_3_SHOOTING. -
SHOOTING_RUNNING
Currently tracking and shooting at a target. Spindexer is spindexing. -
SHOOTING_PAUSED
We wereshooting, but for whatever reason we had to stop to wait on a mechanism to ready (maybe the turret reached a limit and had to wrap around).Once we're ready again, we'll immediately transition back to
SHOOTING_RUNNING.
-
-
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
-