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
FieldsModifier and TypeFieldDescriptionstatic final doubleThe minimum value that joystick inputs must exceed to be registered.static TriggerButton for activating the drive facing best object command.static TriggerButton for activating the pathfind to best object command.static TriggerA temporary test button.static TriggerA temporary test button. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleGets the rotation input from the driver's controller.static doubleGets the forward/backward translation input from the driver's controller.static doubleGets the left/right translation input from the driver's controller.static doubleGets the turbo (fast) speed control input value.static doubleGets 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
-