Class GamepadSim
java.lang.Object
org.wpilib.simulation.GenericHIDSim
org.wpilib.simulation.GamepadSim
Class to control a simulated Gamepad controller.
-
Field Summary
Fields inherited from class GenericHIDSim
m_port -
Constructor Summary
ConstructorsConstructorDescriptionGamepadSim(int port) Constructs from a joystick port number.GamepadSim(Gamepad joystick) Constructs from a Gamepad object. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetBackButton(boolean value) Change the value of the Back button on the controller.voidsetDpadDownButton(boolean value) Change the value of the D-pad down button on the controller.voidsetDpadLeftButton(boolean value) Change the value of the D-pad left button on the controller.voidsetDpadRightButton(boolean value) Change the value of the D-pad right button on the controller.voidsetDpadUpButton(boolean value) Change the value of the D-pad up button on the controller.voidsetEastFaceButton(boolean value) Change the value of the East Face button on the controller.voidsetGuideButton(boolean value) Change the value of the Guide button on the controller.voidsetLeftBumperButton(boolean value) Change the value of the right bumper button on the controller.voidsetLeftPaddle1Button(boolean value) Change the value of the Left Paddle 1 button on the controller.voidsetLeftPaddle2Button(boolean value) Change the value of the Left Paddle 2 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.voidsetMisc1Button(boolean value) Change the value of the Miscellaneous 1 button on the controller.voidsetMisc2Button(boolean value) Change the value of the Miscellaneous 2 button on the controller.voidsetMisc3Button(boolean value) Change the value of the Miscellaneous 3 button on the controller.voidsetMisc4Button(boolean value) Change the value of the Miscellaneous 4 button on the controller.voidsetMisc5Button(boolean value) Change the value of the Miscellaneous 5 button on the controller.voidsetMisc6Button(boolean value) Change the value of the Miscellaneous 6 button on the controller.voidsetNorthFaceButton(boolean value) Change the value of the North Face button on the controller.voidsetRightBumperButton(boolean value) Change the value of the right bumper button on the controller.voidsetRightPaddle1Button(boolean value) Change the value of the Right Paddle 1 button on the controller.voidsetRightPaddle2Button(boolean value) Change the value of the Right Paddle 2 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.voidsetSouthFaceButton(boolean value) Change the value of the South Face button on the controller.voidsetStartButton(boolean value) Change the value of the Start button on the controller.voidsetTouchpadButton(boolean value) Change the value of the Touchpad button on the controller.voidsetWestFaceButton(boolean value) Change the value of the West Face 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
-
GamepadSim
Constructs from a Gamepad object.- Parameters:
joystick- controller to simulate
-
GamepadSim
-
-
Method Details
-
setLeftX
Change the left 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
-
setRightX
Change the right X 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
-
setSouthFaceButton
Change the value of the South Face button on the controller.- Parameters:
value- the new value
-
setEastFaceButton
Change the value of the East Face button on the controller.- Parameters:
value- the new value
-
setWestFaceButton
Change the value of the West Face button on the controller.- Parameters:
value- the new value
-
setNorthFaceButton
Change the value of the North Face 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
-
setGuideButton
Change the value of the Guide 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
-
setLeftBumperButton
Change the value of the right 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
-
setDpadUpButton
Change the value of the D-pad up button on the controller.- Parameters:
value- the new value
-
setDpadDownButton
Change the value of the D-pad down button on the controller.- Parameters:
value- the new value
-
setDpadLeftButton
Change the value of the D-pad left button on the controller.- Parameters:
value- the new value
-
setDpadRightButton
Change the value of the D-pad right button on the controller.- Parameters:
value- the new value
-
setMisc1Button
Change the value of the Miscellaneous 1 button on the controller.- Parameters:
value- the new value
-
setRightPaddle1Button
Change the value of the Right Paddle 1 button on the controller.- Parameters:
value- the new value
-
setLeftPaddle1Button
Change the value of the Left Paddle 1 button on the controller.- Parameters:
value- the new value
-
setRightPaddle2Button
Change the value of the Right Paddle 2 button on the controller.- Parameters:
value- the new value
-
setLeftPaddle2Button
Change the value of the Left Paddle 2 button on the controller.- Parameters:
value- the new value
-
setTouchpadButton
Change the value of the Touchpad button on the controller.- Parameters:
value- the new value
-
setMisc2Button
Change the value of the Miscellaneous 2 button on the controller.- Parameters:
value- the new value
-
setMisc3Button
Change the value of the Miscellaneous 3 button on the controller.- Parameters:
value- the new value
-
setMisc4Button
Change the value of the Miscellaneous 4 button on the controller.- Parameters:
value- the new value
-
setMisc5Button
Change the value of the Miscellaneous 5 button on the controller.- Parameters:
value- the new value
-
setMisc6Button
Change the value of the Miscellaneous 6 button on the controller.- Parameters:
value- the new value
-