Package frc.alotobots

Class OI

java.lang.Object
frc.alotobots.OI

public class OI extends Object
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
The class provides static methods to access controller inputs and defines button bindings for commanding various robot subsystems and states.
  • Field Details

    • DEADBAND

      public static final double DEADBAND
      The 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

      public static final Trigger 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

      public static final Trigger resetGyroButton
    • climbButton

      public static final Trigger climbButton
    • unClimbButton

      public static final Trigger unClimbButton
    • lockWheelsButton

      public static final Trigger lockWheelsButton
    • alignLeftBranchButton

      public static final Trigger alignLeftBranchButton
    • alignRightBranchButton

      public static final Trigger alignRightBranchButton
    • alignNearestCoralStationButton

      public static final Trigger alignNearestCoralStationButton
    • stateCoralCoralStationButton

      public static final Trigger stateCoralCoralStationButton
    • stateCoralStowedButton

      public static final Trigger stateCoralStowedButton
    • stateCoralL4Button

      public static final Trigger stateCoralL4Button
    • stateCoralL3Button

      public static final Trigger stateCoralL3Button
    • stateCoralL2Button

      public static final Trigger stateCoralL2Button
    • stateCoralL1Button

      public static final Trigger stateCoralL1Button
    • coralIntakeReleaseButton

      public static final Trigger coralIntakeReleaseButton
    • stateAlgaeL3Button

      public static final Trigger stateAlgaeL3Button
    • stateAlgaeL2Button

      public static final Trigger stateAlgaeL2Button
    • stateCoralGroundButton

      public static final Trigger stateCoralGroundButton
    • coralIntakeIntakeManualButton

      public static final Trigger coralIntakeIntakeManualButton
    • coralIntakeEjectManualButton

      public static final Trigger coralIntakeEjectManualButton
    • ejectCoralButton

      public static final Trigger ejectCoralButton
    • coralIntakeEjectThroughButton

      public static final Trigger coralIntakeEjectThroughButton
      Trigger for activating the coral eject-through function
    • wristL4coralButton

      public static final Trigger wristL4coralButton
    • wristL2and3coralButton

      public static final Trigger wristL2and3coralButton
    • wristGroundButton

      public static final Trigger wristGroundButton
    • elevatorStowButton

      public static final Trigger elevatorStowButton
      Trigger for moving the elevator to stow position using backup A button.
    • elevatorL2Button

      public static final Trigger elevatorL2Button
    • elevatorL3Button

      public static final Trigger elevatorL3Button
    • elevatorL4Button

      public static final Trigger 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