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 classGroups axis-related constants together for better organization. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Triggerstatic final Triggerstatic final Triggerstatic final Triggerstatic final Triggerstatic final Triggerstatic final Triggerstatic final doubleThe minimum value that joystick inputs must exceed to be registered.static final TriggerTrigger that activates when the driver is using the chassis control sticks.static final Triggerstatic final Triggerstatic final Triggerstatic final Triggerstatic final Triggerstatic final Triggerstatic final Triggerstatic final Triggerstatic final Triggerstatic final Triggerstatic final Triggerstatic final TriggerTemporary test buttonstatic final Trigger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleGets the manual elevator control input by selecting the larger magnitude input between the two co-driver controllers.static doubleGets the rotation input from the driver's right stick.static doubleGets the forward/backward translation input from the driver's left stick.static doubleGets the left/right translation input from the driver's left stick.static doubleGets the turbo (fast) speed control input from the driver's right trigger.static doubleGets the turtle (slow) speed control input from the driver's left trigger.static doubleGets 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
-
testButton
Temporary test button -
climbButton
-
unClimbButton
-
lockWheelsButton
-
alignLeftBranchButton
-
alignRightBranchButton
-
alignNearestCoralStationButton
-
stateCoralCoralStationButton
-
stateCoralStowedButton
-
stateCoralL4Button
-
stateCoralL3Button
-
stateCoralL2Button
-
stateCoralL1Button
-
coralIntakeReleaseButton
-
stateAlgaeL3Button
-
stateAlgaeL2Button
-
stateCoralGroundButton
-
coralIntakeIntakeManualButton
-
coralIntakeEjectManualButton
-
-
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
-