Class NiDsXboxControllerSim
java.lang.Object
org.wpilib.simulation.GenericHIDSim
org.wpilib.simulation.NiDsXboxControllerSim
Class to control a simulated NiDsXbox controller.
-
Field Summary
Fields inherited from class GenericHIDSim
m_port -
Constructor Summary
ConstructorsConstructorDescriptionNiDsXboxControllerSim(int port) Constructs from a joystick port number.NiDsXboxControllerSim(NiDsXboxController joystick) Constructs from a NiDsXboxController object. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetAButton(boolean value) Change the value of the A button on the controller.voidsetBackButton(boolean value) Change the value of the back button on the controller.voidsetBButton(boolean value) Change the value of the B button on the controller.voidsetLeftBumperButton(boolean value) Change the value of the left bumper button on the controller.voidsetLeftStickButton(boolean value) Change the value of the left stick button on the controller.voidsetLeftTriggerAxis(double value) Change the value of the left trigger axis on the controller.voidsetLeftX(double value) Change the left X value of the controller's joystick.voidsetLeftY(double value) Change the left Y value of the controller's joystick.voidsetRightBumperButton(boolean value) Change the value of the right bumper button on the controller.voidsetRightStickButton(boolean value) Change the value of the right stick button on the controller.voidsetRightTriggerAxis(double value) Change the value of the right trigger axis on the controller.voidsetRightX(double value) Change the right X value of the controller's joystick.voidsetRightY(double value) Change the right Y value of the controller's joystick.voidsetStartButton(boolean value) Change the value of the start button on the controller.voidsetXButton(boolean value) Change the value of the X button on the controller.voidsetYButton(boolean value) Change the value of the Y button on the controller.Methods inherited from class GenericHIDSim
getLeds, getRumble, notifyNewData, setAxesAvailable, setAxesMaximumIndex, setButtonsAvailable, setButtonsMaximumIndex, setGamepadType, setName, setPOV, setPOV, setPOVsAvailable, setPOVsMaximumIndex, setRawAxis, setRawButton, setSupportedOutputs
-
Constructor Details
-
NiDsXboxControllerSim
Constructs from a NiDsXboxController object.- Parameters:
joystick- controller to simulate
-
NiDsXboxControllerSim
Constructs from a joystick port number.- Parameters:
port- port number
-
-
Method Details
-
setLeftX
Change the left X value of the controller's joystick.- Parameters:
value- the new value
-
setRightX
Change the right X value of the controller's joystick.- Parameters:
value- the new value
-
setLeftY
Change the left Y value of the controller's joystick.- Parameters:
value- the new value
-
setRightY
Change the right Y value of the controller's joystick.- Parameters:
value- the new value
-
setLeftTriggerAxis
Change the value of the left trigger axis on the controller.- Parameters:
value- the new value
-
setRightTriggerAxis
Change the value of the right trigger axis on the controller.- Parameters:
value- the new value
-
setAButton
Change the value of the A button on the controller.- Parameters:
value- the new value
-
setBButton
Change the value of the B button on the controller.- Parameters:
value- the new value
-
setXButton
Change the value of the X button on the controller.- Parameters:
value- the new value
-
setYButton
Change the value of the Y button on the controller.- Parameters:
value- the new value
-
setLeftBumperButton
Change the value of the left bumper button on the controller.- Parameters:
value- the new value
-
setRightBumperButton
Change the value of the right bumper button on the controller.- Parameters:
value- the new value
-
setBackButton
Change the value of the back button on the controller.- Parameters:
value- the new value
-
setStartButton
Change the value of the start button on the controller.- Parameters:
value- the new value
-
setLeftStickButton
Change the value of the left stick button on the controller.- Parameters:
value- the new value
-
setRightStickButton
Change the value of the right stick button on the controller.- Parameters:
value- the new value
-