Package frc.robot
Class OI
- java.lang.Object
-
- frc.robot.OI
-
public class OI extends java.lang.Object
This class is the glue that binds the controls on the physical operator interface to the commands and command groups that allow control of the robot.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OI
getInstance()
Get the OI instancedouble
getThrottle()
Get the robot "throttle" inputdouble
getTurn()
Get the robot "turn" inputClimber.Position
getWantedClimbPosition()
boolean
isDriveInverted()
Check if the driver has enabled drivetrain inversion.void
resetIntakeInput()
Reset the intake input togglevoid
resetLower()
void
resetUnjamInput()
void
rumbleDriver(double force)
Send a rumble command to the driver controllervoid
rumbleOperator(double force)
Send a rumble command to the operator controllerboolean
shouldAddCell()
boolean
shouldAutoAim()
Get if the drivebase should switch to auto-aim modeboolean
shouldCancelClimb()
boolean
shouldEjectClimber()
Check if the climber should be ejectedboolean
shouldIncrPanelRight()
boolean
shouldIntake()
Check if the robot should be intaking balls right nowboolean
shouldLowerBallsToBottom()
boolean
shouldResetCellCount()
Should the cell counter be reset?boolean
shouldRotatePanel()
boolean
shouldShoot()
Check if the robot should be shooting balls right nowboolean
shouldSubtractCell()
boolean
shouldUnjam()
boolean
shouldUnjamUp()
-
-
-
Method Detail
-
getInstance
public static OI getInstance()
Get the OI instance- Returns:
- OI instance
-
rumbleDriver
public void rumbleDriver(double force)
Send a rumble command to the driver controller- Parameters:
force
- Force from 0-2
-
rumbleOperator
public void rumbleOperator(double force)
Send a rumble command to the operator controller- Parameters:
force
- Force from 0-2
-
getThrottle
public double getThrottle()
Get the robot "throttle" input- Returns:
- Throttle [-1.0-1.0]
-
getTurn
public double getTurn()
Get the robot "turn" input- Returns:
- Turn [-1.0-1.0]
-
isDriveInverted
public boolean isDriveInverted()
Check if the driver has enabled drivetrain inversion. This is a toggle- Returns:
- Should the drivetrain be inverted?
-
shouldAutoAim
public boolean shouldAutoAim()
Get if the drivebase should switch to auto-aim mode- Returns:
- Should be auto-aiming?
-
shouldShoot
public boolean shouldShoot()
Check if the robot should be shooting balls right now- Returns:
- Should be shooting?
-
shouldRotatePanel
public boolean shouldRotatePanel()
-
shouldIncrPanelRight
public boolean shouldIncrPanelRight()
-
shouldEjectClimber
public boolean shouldEjectClimber()
Check if the climber should be ejected
-
shouldCancelClimb
public boolean shouldCancelClimb()
-
getWantedClimbPosition
public Climber.Position getWantedClimbPosition()
-
shouldIntake
public boolean shouldIntake()
Check if the robot should be intaking balls right now- Returns:
- Should intake
-
resetIntakeInput
public void resetIntakeInput()
Reset the intake input toggle
-
shouldResetCellCount
public boolean shouldResetCellCount()
Should the cell counter be reset?- Returns:
- Should reset
-
shouldUnjam
public boolean shouldUnjam()
-
shouldUnjamUp
public boolean shouldUnjamUp()
-
shouldLowerBallsToBottom
public boolean shouldLowerBallsToBottom()
-
resetLower
public void resetLower()
-
resetUnjamInput
public void resetUnjamInput()
-
shouldAddCell
public boolean shouldAddCell()
-
shouldSubtractCell
public boolean shouldSubtractCell()
-
-