Package xbot.common.controls.sensors
Class XXboxController
java.lang.Object
xbot.common.controls.sensors.XJoystick
xbot.common.controls.sensors.XXboxController
- Direct Known Subclasses:
MockXboxControllerAdapter
,XboxControllerWpiAdapter
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static interface
Nested classes/interfaces inherited from class xbot.common.controls.sensors.XJoystick
XJoystick.ButtonSource, XJoystick.XJoystickFactory
-
Field Summary
Modifier and TypeFieldDescriptionprotected final RobotAssertionManager
protected boolean
protected boolean
protected final int
protected boolean
protected boolean
protected final XRumbleManager
-
Constructor Summary
ModifierConstructorDescriptionprotected
XXboxController
(int port, AdvancedJoystickButtonTrigger.AdvancedJoystickButtonTriggerFactory joystickButtonFactory, AdvancedPovButtonTrigger.AdvancedPovButtonTriggerFactory advancedPovButtonFactory, AnalogHIDButtonTrigger.AnalogHIDButtonTriggerFactory analogHidButtonFactory, XRumbleManager.XRumbleManagerFactory rumbleManagerFactory, RobotAssertionManager assertionManager, DevicePolice police) -
Method Summary
Modifier and TypeMethodDescriptiongetifAvailable
(XXboxController.XboxButton buttonName) protected abstract double
protected abstract double
protected abstract double
double
double
double
protected abstract double
protected abstract double
protected abstract double
double
double
double
getXboxButton
(XXboxController.XboxButton buttonName) void
setLeftInversion
(boolean xInverted, boolean yInverted) void
setRightInversion
(boolean xInverted, boolean yInverted) Methods inherited from class xbot.common.controls.sensors.XJoystick
addAnalogButton, addAnalogButton, getAnalogIfAvailable, getAxisInverted, getButton, getGenericHID, getifAvailable, getPort, getPOV, getPovIfAvailable, getRawAxis, getVectorForAxisPair, setAxisInverted
-
Field Details
-
port
protected final int port -
assertionManager
-
allocatedButtons
-
leftXInversion
protected boolean leftXInversion -
leftYInversion
protected boolean leftYInversion -
rightXInversion
protected boolean rightXInversion -
rightYInversion
protected boolean rightYInversion -
rumbleManager
-
-
Constructor Details
-
XXboxController
protected XXboxController(int port, AdvancedJoystickButtonTrigger.AdvancedJoystickButtonTriggerFactory joystickButtonFactory, AdvancedPovButtonTrigger.AdvancedPovButtonTriggerFactory advancedPovButtonFactory, AnalogHIDButtonTrigger.AnalogHIDButtonTriggerFactory analogHidButtonFactory, XRumbleManager.XRumbleManagerFactory rumbleManagerFactory, RobotAssertionManager assertionManager, DevicePolice police)
-
-
Method Details
-
getRumbleManager
- Specified by:
getRumbleManager
in interfaceIRumbler
-
getifAvailable
-
getXboxButton
-
getLeftVector
- Specified by:
getLeftVector
in interfaceIGamepad
-
getRightVector
- Specified by:
getRightVector
in interfaceIGamepad
-
getLeftFieldOrientedVector
- Specified by:
getLeftFieldOrientedVector
in interfaceIGamepad
-
getRightFieldOrientedVector
- Specified by:
getRightFieldOrientedVector
in interfaceIGamepad
-
setLeftInversion
public void setLeftInversion(boolean xInverted, boolean yInverted) - Specified by:
setLeftInversion
in interfaceIGamepad
-
setRightInversion
public void setRightInversion(boolean xInverted, boolean yInverted) - Specified by:
setRightInversion
in interfaceIGamepad
-
getLeftStickX
public double getLeftStickX() -
getRightStickX
public double getRightStickX() -
getLeftStickY
public double getLeftStickY() -
getRightStickY
public double getRightStickY() -
getLeftTrigger
public double getLeftTrigger()- Specified by:
getLeftTrigger
in interfaceIGamepad
-
getRightTrigger
public double getRightTrigger()- Specified by:
getRightTrigger
in interfaceIGamepad
-
getLeftRawTriggerAxis
protected abstract double getLeftRawTriggerAxis() -
getRightRawTriggerAxis
protected abstract double getRightRawTriggerAxis() -
getLeftRawX
protected abstract double getLeftRawX() -
getLeftRawY
protected abstract double getLeftRawY() -
getRightRawX
protected abstract double getRightRawX() -
getRightRawY
protected abstract double getRightRawY()
-