Package frc.robot
Class OI
- java.lang.Object
-
- frc.robot.OI
-
public class OI extends java.lang.ObjectThis 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 OIgetInstance()Get the OI instancedoublegetThrottle()Get the robot "throttle" inputdoublegetTurn()Get the robot "turn" inputClimber.PositiongetWantedClimbPosition()booleanisDriveInverted()Check if the driver has enabled drivetrain inversion.voidresetIntakeInput()Reset the intake input togglevoidresetLower()voidresetUnjamInput()voidrumbleDriver(double force)Send a rumble command to the driver controllervoidrumbleOperator(double force)Send a rumble command to the operator controllerbooleanshouldAddCell()booleanshouldAutoAim()Get if the drivebase should switch to auto-aim modebooleanshouldCancelClimb()booleanshouldEjectClimber()Check if the climber should be ejectedbooleanshouldIncrPanelRight()booleanshouldIntake()Check if the robot should be intaking balls right nowbooleanshouldLowerBallsToBottom()booleanshouldResetCellCount()Should the cell counter be reset?booleanshouldRotatePanel()booleanshouldShoot()Check if the robot should be shooting balls right nowbooleanshouldSubtractCell()booleanshouldUnjam()booleanshouldUnjamUp()
-
-
-
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()
-
-