Class MockJoystick
java.lang.Object
xbot.common.controls.sensors.XJoystick
xbot.common.controls.sensors.mock_adapters.MockJoystick
-
Nested Class Summary
Nested classes/interfaces inherited from class xbot.common.controls.sensors.XJoystick
XJoystick.ButtonSource, XJoystick.XJoystickFactory
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMockJoystick
(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
setRawAxis
(int which, double value) void
setX
(double x) void
setY
(double y) Methods inherited from class xbot.common.controls.sensors.XJoystick
addAnalogButton, addAnalogButton, getAnalogIfAvailable, getAxisInverted, getifAvailable, getPort, getPovIfAvailable, getVectorForAxisPair, setAxisInverted
-
Constructor Details
-
MockJoystick
@AssistedInject public MockJoystick(@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
-
getPOV
public int getPOV() -
getGenericHID
- Specified by:
getGenericHID
in classXJoystick
-