Class XboxController
java.lang.Object
edu.wpi.first.wpilibj.GenericHID
io.github.tigerbotics7125.tigerlib.input.controller.XboxController
public class XboxController
extends edu.wpi.first.wpilibj.GenericHID
An input wrapper for the Xbox controller.
Saves RAM on the roborio by only instantiating a button when its used. CPU time is cheaper than RAM in this scenario.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj.GenericHID
edu.wpi.first.wpilibj.GenericHID.HIDType, edu.wpi.first.wpilibj.GenericHID.RumbleType
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class edu.wpi.first.wpilibj.GenericHID
axisGreaterThan, axisLessThan, button, getAxisCount, getAxisType, getButtonCount, getName, getPort, getPOV, getPOV, getPOVCount, getRawAxis, getRawButton, getRawButtonPressed, getRawButtonReleased, getType, isConnected, pov, pov, povCenter, povDown, povDownLeft, povDownRight, povLeft, povRight, povUp, povUpLeft, povUpRight, setOutput, setOutputs, setRumble
-
Field Details
-
pov
-
-
Constructor Details
-
XboxController
public XboxController(int port) - Parameters:
port
- The port on the Driver Station that the joystick is plugged into
-
-
Method Details
-
a
- Returns:
- The a
JoystickTrigger
.
-
b
- Returns:
- The b
JoystickTrigger
.
-
x
- Returns:
- The x
JoystickTrigger
.
-
y
- Returns:
- The y
JoystickTrigger
.
-
lb
- Returns:
- The left bumper's
JoystickTrigger
.
-
rb
- Returns:
- The right bumper's
JoystickTrigger
.
-
back
- Returns:
- The back
JoystickTrigger
.
-
start
- Returns:
- The start
JoystickTrigger
.
-
lStick
- Returns:
- The left stick's
JoystickTrigger
-
rStick
- Returns:
- The right stick's
JoystickTrigger
.
-
leftX
East is considered positive.- Returns:
- The left stick's x
JoystickAxis
-
leftY
North is considered positive.- Returns:
- The left stick's y
JoystickAxis
.
-
lt
- Returns:
- The left trigger's
JoystickAxis
.
-
rt
- Returns:
- The right trigger's
JoystickAxis
.
-
rightX
East is considered positive.- Returns:
- The right stick's x
JoystickAxis
.
-
rightY
North is considered positive.- Returns:
- The right stick's y
JoystickAxis
.
-