Package frc.robot.hardware
Class Gamepad1
- java.lang.Object
-
- edu.wpi.first.wpilibj.GenericHID
-
- edu.wpi.first.wpilibj.XboxController
-
- frc.robot.hardware.Gamepad1
-
public class Gamepad1 extends edu.wpi.first.wpilibj.XboxControllerUse this for reading inputs from Xbox controller 0
-
-
Constructor Summary
Constructors Constructor Description Gamepad1()Use this for reading inputs from Xbox controller 0
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetLeftY()Get the inverted Y axis value of left side of the controller.doublegetRightY()Get the inverted Y axis value of right side of the controller.voidsetRumble(double left, double right)Rumble the gamepad-
Methods inherited from class edu.wpi.first.wpilibj.XboxController
getAButton, getAButtonPressed, getAButtonReleased, getBackButton, getBackButtonPressed, getBackButtonReleased, getBButton, getBButtonPressed, getBButtonReleased, getLeftBumper, getLeftBumperPressed, getLeftBumperReleased, getLeftStickButton, getLeftStickButtonPressed, getLeftStickButtonReleased, getLeftTriggerAxis, getLeftX, getRightBumper, getRightBumperPressed, getRightBumperReleased, getRightStickButton, getRightStickButtonPressed, getRightStickButtonReleased, getRightTriggerAxis, getRightX, getStartButton, getStartButtonPressed, getStartButtonReleased, getXButton, getXButtonPressed, getXButtonReleased, getYButton, getYButtonPressed, getYButtonReleased
-
-
-
-
Method Detail
-
setRumble
public void setRumble(double left, double right)Rumble the gamepad- Parameters:
left- the amount to vibrate the left vibrater (0 to 1)right- the amount to vibrate the right vibrater (0 to 1)
-
getLeftY
public double getLeftY()
Get the inverted Y axis value of left side of the controller.- Overrides:
getLeftYin classedu.wpi.first.wpilibj.XboxController- Returns:
- The axis value.
-
getRightY
public double getRightY()
Get the inverted Y axis value of right side of the controller.- Overrides:
getRightYin classedu.wpi.first.wpilibj.XboxController- Returns:
- The axis value.
-
-