Package frc.alotobots
Class OI
java.lang.Object
frc.alotobots.OI
The Operator Interface (OI) class handles all driver control inputs and button mappings. This
class manages three Xbox controllers:
- Driver Controller: Primary robot movement and speed control
- Co-Driver Controller: State-based controls and shared subsystem control
- Co-Driver Backup Controller: Manual subsystem controls and redundant options
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Groups axis-related constants together for better organization. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Trigger
static final Trigger
static final Trigger
static final Trigger
static final Trigger
static final Trigger
Trigger for activating the coral eject-through functionstatic final Trigger
static final Trigger
static final double
The minimum value that joystick inputs must exceed to be registered.static final Trigger
static final Trigger
static final Trigger
static final Trigger
static final Trigger
Trigger for moving the elevator to stow position using backup A button.static final Trigger
Trigger that activates when the driver is using the chassis control sticks.static final Trigger
static final Trigger
static final Trigger
static final Trigger
static final Trigger
static final Trigger
static final Trigger
static final Trigger
static final Trigger
static final Trigger
static final Trigger
static final Trigger
static final Trigger
static final Trigger
static final Trigger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic double
Gets the manual elevator control input by selecting the larger magnitude input between the two co-driver controllers.static double
Gets the rotation input from the driver's right stick.static double
Gets the forward/backward translation input from the driver's left stick.static double
Gets the left/right translation input from the driver's left stick.static double
Gets the turbo (fast) speed control input from the driver's right trigger.static double
Gets the turtle (slow) speed control input from the driver's left trigger.static double
Gets the manual wrist control input by selecting the larger magnitude input between the two co-driver controllers.
-
Field Details
-
DEADBAND
public static final double DEADBANDThe minimum value that joystick inputs must exceed to be registered. This deadband prevents unintended movement from controller drift and provides a stable neutral position for the controls.- See Also:
-
hasDriverInput
Trigger that activates when the driver is using the chassis control sticks. Combines X/Y translation and rotation inputs with deadband application to detect intentional driver input. -
resetGyroButton
-
climbButton
-
unClimbButton
-
lockWheelsButton
-
alignLeftBranchButton
-
alignRightBranchButton
-
alignNearestCoralStationButton
-
stateCoralCoralStationButton
-
stateCoralStowedButton
-
stateCoralL4Button
-
stateCoralL3Button
-
stateCoralL2Button
-
stateCoralL1Button
-
coralIntakeReleaseButton
-
stateAlgaeL3Button
-
stateAlgaeL2Button
-
stateCoralGroundButton
-
coralIntakeIntakeManualButton
-
coralIntakeEjectManualButton
-
ejectCoralButton
-
coralIntakeEjectThroughButton
Trigger for activating the coral eject-through function -
wristL4coralButton
-
wristL2and3coralButton
-
wristGroundButton
-
elevatorStowButton
Trigger for moving the elevator to stow position using backup A button. -
elevatorL2Button
-
elevatorL3Button
-
elevatorL4Button
-
-
Constructor Details
-
OI
public OI()
-
-
Method Details
-
getTranslateForwardAxis
public static double getTranslateForwardAxis()Gets the forward/backward translation input from the driver's left stick.- Returns:
- Value between -1.0 (backward) and 1.0 (forward)
-
getTranslateStrafeAxis
public static double getTranslateStrafeAxis()Gets the left/right translation input from the driver's left stick.- Returns:
- Value between -1.0 (left) and 1.0 (right)
-
getRotationAxis
public static double getRotationAxis()Gets the rotation input from the driver's right stick.- Returns:
- Value between -1.0 (counter-clockwise) and 1.0 (clockwise)
-
getTurtleSpeedTrigger
public static double getTurtleSpeedTrigger()Gets the turtle (slow) speed control input from the driver's left trigger. Used to enable precise, slow movement for delicate operations.- Returns:
- Value between 0.0 (not pressed) and 1.0 (fully pressed)
-
getTurboSpeedTrigger
public static double getTurboSpeedTrigger()Gets the turbo (fast) speed control input from the driver's right trigger. Used to enable maximum speed movement for quick traversal.- Returns:
- Value between 0.0 (not pressed) and 1.0 (fully pressed)
-
getElevatorAxis
public static double getElevatorAxis()Gets the manual elevator control input by selecting the larger magnitude input between the two co-driver controllers. Applies deadband after selection.- Returns:
- Value between -1.0 (down) and 1.0 (up)
-
getWristAxis
public static double getWristAxis()Gets the manual wrist control input by selecting the larger magnitude input between the two co-driver controllers. Applies deadband after selection.- Returns:
- Value between -1.0 and 1.0
-