Class MockFTCGamepad
java.lang.Object
xbot.common.controls.sensors.XJoystick
xbot.common.controls.sensors.XFTCGamepad
xbot.common.controls.sensors.mock_adapters.MockFTCGamepad
- All Implemented Interfaces:
IGamepad
-
Nested Class Summary
Nested classes/interfaces inherited from class xbot.common.controls.sensors.XFTCGamepad
XFTCGamepad.XFTCGamepadFactory
Nested classes/interfaces inherited from class xbot.common.controls.sensors.XJoystick
XJoystick.ButtonSource, XJoystick.XJoystickFactory
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMockFTCGamepad
(int port, AdvancedJoystickButtonTrigger.AdvancedJoystickButtonTriggerFactory joystickButtonFactory, AdvancedPovButtonTrigger.AdvancedPovButtonTriggerFactory povButtonFactory, AnalogHIDButtonTrigger.AnalogHIDButtonTriggerFactory analogHidButtonFactory, RobotAssertionManager assertionManager, int numButtons, DevicePolice police) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getButton
(int button) int
getPOV()
double
getRawAxis
(int which) void
pressButton
(int button) void
releaseButton
(int button) void
setLeftStick
(XYPair vector) void
setRawAxis
(int which, double value) void
setRightStick
(XYPair vector) void
setX
(double x) void
setY
(double y) Methods inherited from class xbot.common.controls.sensors.XFTCGamepad
getLeftFieldOrientedVector, getLeftJoystickXAxis, getLeftJoystickYAxis, getLeftTrigger, getLeftTriggerAxis, getLeftVector, getRightFieldOrientedVector, getRightJoystickXAxis, getRightJoystickYAxis, getRightTrigger, getRightTriggerAxis, getRightVector, setLeftInversion, setRightInversion
Methods inherited from class xbot.common.controls.sensors.XJoystick
addAnalogButton, addAnalogButton, getAnalogIfAvailable, getAxisInverted, getifAvailable, getPort, getPovIfAvailable, getVectorForAxisPair, setAxisInverted
-
Constructor Details
-
MockFTCGamepad
@AssistedInject public MockFTCGamepad(@Assisted("port") int port, AdvancedJoystickButtonTrigger.AdvancedJoystickButtonTriggerFactory joystickButtonFactory, AdvancedPovButtonTrigger.AdvancedPovButtonTriggerFactory povButtonFactory, AnalogHIDButtonTrigger.AnalogHIDButtonTriggerFactory analogHidButtonFactory, RobotAssertionManager assertionManager, @Assisted("numButtons") int numButtons, DevicePolice police)
-
-
Method Details
-
setX
public void setX(double x) -
setY
public void setY(double y) -
setRawAxis
public void setRawAxis(int which, double value) -
pressButton
public void pressButton(int button) -
releaseButton
public void releaseButton(int button) -
getButton
public boolean getButton(int button) -
getRawAxis
public double getRawAxis(int which) - Specified by:
getRawAxis
in classXJoystick
-
setLeftStick
-
setRightStick
-
getPOV
public int getPOV() -
getGenericHID
- Specified by:
getGenericHID
in classXJoystick
-