Package org.firstinspires.ftc.teamcode
Class API.Gamepad
- java.lang.Object
-
- org.firstinspires.ftc.teamcode.API.Gamepad
-
- Enclosing class:
- API
public class API.Gamepad extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getA()
int
getABXY()
Returns the status of all four buttons, as a 4-bit integer.double
getAllButtons()
boolean
getB()
boolean
getBack()
int
getBumpers()
int
getDPad()
boolean
getDPadDown()
boolean
getDPadLeft()
boolean
getDPadRight()
boolean
getDPadUp()
boolean
getGuide()
boolean
getL3()
boolean
getLB()
double
getLeftStickX()
double
getLeftStickY()
double
getLT()
int
getMiscButtons()
boolean
getR3()
boolean
getRB()
double
getRightStickX()
double
getRightStickY()
double
getRT()
boolean
getStart()
double
getStickClicks()
boolean
getX()
boolean
getY()
-
-
-
Method Detail
-
getLeftStickX
public double getLeftStickX()
-
getLeftStickY
public double getLeftStickY()
-
getRightStickX
public double getRightStickX()
-
getRightStickY
public double getRightStickY()
-
getA
public boolean getA()
-
getB
public boolean getB()
-
getX
public boolean getX()
-
getY
public boolean getY()
-
getABXY
public int getABXY()
Returns the status of all four buttons, as a 4-bit integer.
The four bits are A, B, X, and Y, respectively.
To get B, do:(abxy >> 2) % 2
The amount to bitshift is determined its position in the returned number.- Returns:
- The status of all four buttons as a 4-bit integer
-
getDPadUp
public boolean getDPadUp()
-
getDPadDown
public boolean getDPadDown()
-
getDPadLeft
public boolean getDPadLeft()
-
getDPadRight
public boolean getDPadRight()
-
getDPad
public int getDPad()
-
getLB
public boolean getLB()
-
getRB
public boolean getRB()
-
getBumpers
public int getBumpers()
-
getLT
public double getLT()
-
getRT
public double getRT()
-
getL3
public boolean getL3()
-
getR3
public boolean getR3()
-
getStickClicks
public double getStickClicks()
-
getGuide
public boolean getGuide()
-
getStart
public boolean getStart()
-
getBack
public boolean getBack()
-
getMiscButtons
public int getMiscButtons()
-
getAllButtons
public double getAllButtons()
-
-