Package frc.robot
Class TeleopInput
java.lang.Object
frc.robot.TeleopInput
Common class for providing driver inputs during Teleop.
This class is the sole owner of WPILib input objects and is responsible for
polling input values. Systems may query TeleopInput via its getter methods
for inputs by value, but may not access the internal input objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet the value of the L1 button.booleanGet Square Button Pressed for Drive Controller.booleanGet the value of the R1 button.booleanGet Cross Button Pressed for Drive Controller.booleanGet Circle Button Pressed for Drive Controller.doubleGet X axis of Drive Controller.doubleGet Y axis of Drive Controller.doubleGet X axis of Drive Controller right.doubleGet Y axis of Drive Controller right.booleanGet the value of the drive share button.booleanGet drive cross button.doubleGet Y axis of Right Joystick.booleanGet Share Button Pressed for Drive Controller.booleanGets the value of the L2 (left trigger) button.booleanGets the value of the options button.booleanGets the value of the share button.booleanGet the value of the ground elevator target button (circle).booleanGet the value of the source elevator target button (cross).booleanGet the value of the L3 elevator target button (square).booleanGet the value of the L4 elevator target button (triangle).booleanGets the value of the touchpad (manual) button.booleanGets the value of the L1 button.booleanGets the value of the R2 (right trigger) button.booleanGet the value of the intake button (cross).booleanGet the value of the L2 elevator target button (square).booleanGet the value of the L3 elevator target button (circle).booleanGet the value of the L4 elevator target button (triangle).
-
Constructor Details
-
TeleopInput
public TeleopInput()Create a TeleopInput and register input devices. Note that while inputs are registered at robot initialization, valid values will not be provided by WPILib until teleop mode.
-
-
Method Details
-
getDriveLeftJoystickX
public double getDriveLeftJoystickX()Get X axis of Drive Controller.- Returns:
- Axis value
-
getDriveLeftJoystickY
public double getDriveLeftJoystickY()Get Y axis of Drive Controller.- Returns:
- Axis value
-
getDriveRightJoystickX
public double getDriveRightJoystickX()Get X axis of Drive Controller right.- Returns:
- Axis value
-
getDriveRightJoystickY
public double getDriveRightJoystickY()Get Y axis of Drive Controller right.- Returns:
- Axis value
-
getAlignStationButton
public boolean getAlignStationButton()Get Cross Button Pressed for Drive Controller. Used to align the robot to station.- Returns:
- Axis value
-
getAlignReefButton
public boolean getAlignReefButton()Get Square Button Pressed for Drive Controller. Used to align the robot to reef.- Returns:
- Axis value
-
getDriveCircleButton
public boolean getDriveCircleButton()Get Circle Button Pressed for Drive Controller.- Returns:
- Axis value
-
getDriveTurtleButton
public boolean getDriveTurtleButton()Get drive cross button. Damps drivetrain speed.- Returns:
- value
-
getSeedGyroButtonPressed
public boolean getSeedGyroButtonPressed()Get Share Button Pressed for Drive Controller.- Returns:
- Axis value
-
getAlignLeftOffsetButton
public boolean getAlignLeftOffsetButton()Get the value of the L1 button.- Returns:
- L1 button value
-
getAlignRightOffsetButton
public boolean getAlignRightOffsetButton()Get the value of the R1 button.- Returns:
- R1 button value
-
isSuperL2ButtonPressed
public boolean isSuperL2ButtonPressed()Get the value of the L2 elevator target button (square).- Returns:
- If the button is pressed
-
isSuperL3ButtonPressed
public boolean isSuperL3ButtonPressed()Get the value of the L3 elevator target button (circle).- Returns:
- If the button is pressed
-
isSuperL4ButtonPressed
public boolean isSuperL4ButtonPressed()Get the value of the L4 elevator target button (triangle).- Returns:
- If the button is pressed
-
isSuperIntakeButtonPressed
public boolean isSuperIntakeButtonPressed()Get the value of the intake button (cross).- Returns:
- If the button is pressed
-
isGroundButtonPressed
public boolean isGroundButtonPressed()Get the value of the ground elevator target button (circle).- Returns:
- If the button is pressed
-
isL2ButtonPressed
public boolean isL2ButtonPressed()Get the value of the source elevator target button (cross).- Returns:
- If the button is pressed
-
isL3ButtonPressed
public boolean isL3ButtonPressed()Get the value of the L3 elevator target button (square).- Returns:
- If the button is pressed
-
isL4ButtonPressed
public boolean isL4ButtonPressed()Get the value of the L4 elevator target button (triangle).- Returns:
- If the button is pressed
-
isClimbAdvanceStateButtonPressed
public boolean isClimbAdvanceStateButtonPressed()Gets the value of the options button. Intended to signify when the climber should go to the next state.- Returns:
- If the options button was pressed this tick
-
isClimbManualButtonPressed
public boolean isClimbManualButtonPressed()Gets the value of the share button. Intended to signify when the climber should move manually.- Returns:
- If the share button was pressed this tick
-
getManualElevatorMovementInput
public double getManualElevatorMovementInput()Get Y axis of Right Joystick.- Returns:
- Axis value
-
isOuttakeButtonPressed
public boolean isOuttakeButtonPressed()Gets the value of the L1 button. Intended to signify when the outtake should open.- Returns:
- If the L1 button was pressed this tick
-
isAbortButtonPressed
public boolean isAbortButtonPressed()Gets the value of the L2 (left trigger) button. Intended to signify if the mechanisms should stop moving.- Returns:
- If the L2 button was pressed this tick.
-
isResetButtonPressed
public boolean isResetButtonPressed()Gets the value of the R2 (right trigger) button. Intended to signify if the mechanisms should reset after an abort.- Returns:
- If the R2 button was pressed this tick.
-
isManualButtonPressed
public boolean isManualButtonPressed()Gets the value of the touchpad (manual) button.- Returns:
- If the touchpad button was pressed this tick.
-