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 provides methods to access controller inputs and defines button bindings for commanding the
robot.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final double
The minimum value that joystick inputs must exceed to be registered.static Trigger
Button for activating the drive facing best object command.static Trigger
Button for activating the pathfind to best object command.static Trigger
A temporary test button.static Trigger
A temporary test button. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
Gets the rotation input from the driver's controller.static double
Gets the forward/backward translation input from the driver's controller.static double
Gets the left/right translation input from the driver's controller.static double
Gets the turbo (fast) speed control input value.static double
Gets the turtle (slow) speed control input value.
-
Field Details
-
DEADBAND
public static final double DEADBANDThe minimum value that joystick inputs must exceed to be registered. Used to prevent drift and unintended movement.- See Also:
-
driveFacingBestObjectButton
Button for activating the drive facing best object command. -
pathfindToBestObjectButton
Button for activating the pathfind to best object command. -
testButton
A temporary test button. -
testButton2
A temporary test button.
-
-
Constructor Details
-
OI
public OI()
-
-
Method Details
-
getTranslateForwardAxis
public static double getTranslateForwardAxis()Gets the forward/backward translation input from the driver's controller.- 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 controller.- Returns:
- Value between -1.0 (left) and 1.0 (right)
-
getRotationAxis
public static double getRotationAxis()Gets the rotation input from the driver's controller.- Returns:
- Value between -1.0 (counter-clockwise) and 1.0 (clockwise)
-
getTurtleSpeedTrigger
public static double getTurtleSpeedTrigger()Gets the turtle (slow) speed control input value.- Returns:
- Value between 0.0 and 1.0
-
getTurboSpeedTrigger
public static double getTurboSpeedTrigger()Gets the turbo (fast) speed control input value.- Returns:
- Value between 0.0 and 1.0
-