Class GamepadSim

java.lang.Object
org.wpilib.simulation.GenericHIDSim
org.wpilib.simulation.GamepadSim

public class GamepadSim extends GenericHIDSim
Class to control a simulated Gamepad controller.
  • Constructor Details

    • GamepadSim

      public GamepadSim(Gamepad joystick)
      Constructs from a Gamepad object.
      Parameters:
      joystick - controller to simulate
    • GamepadSim

      public GamepadSim(int port)
      Constructs from a joystick port number.
      Parameters:
      port - port number
  • Method Details

    • setLeftX

      public void setLeftX(double value)
      Change the left X value of the controller's joystick.
      Parameters:
      value - the new value
    • setLeftY

      public void setLeftY(double value)
      Change the left Y value of the controller's joystick.
      Parameters:
      value - the new value
    • setRightX

      public void setRightX(double value)
      Change the right X value of the controller's joystick.
      Parameters:
      value - the new value
    • setRightY

      public void setRightY(double value)
      Change the right Y value of the controller's joystick.
      Parameters:
      value - the new value
    • setLeftTriggerAxis

      public void setLeftTriggerAxis(double value)
      Change the value of the left trigger axis on the controller.
      Parameters:
      value - the new value
    • setRightTriggerAxis

      public void setRightTriggerAxis(double value)
      Change the value of the right trigger axis on the controller.
      Parameters:
      value - the new value
    • setSouthFaceButton

      public void setSouthFaceButton(boolean value)
      Change the value of the South Face button on the controller.
      Parameters:
      value - the new value
    • setEastFaceButton

      public void setEastFaceButton(boolean value)
      Change the value of the East Face button on the controller.
      Parameters:
      value - the new value
    • setWestFaceButton

      public void setWestFaceButton(boolean value)
      Change the value of the West Face button on the controller.
      Parameters:
      value - the new value
    • setNorthFaceButton

      public void setNorthFaceButton(boolean value)
      Change the value of the North Face button on the controller.
      Parameters:
      value - the new value
    • setBackButton

      public void setBackButton(boolean value)
      Change the value of the Back button on the controller.
      Parameters:
      value - the new value
    • setGuideButton

      public void setGuideButton(boolean value)
      Change the value of the Guide button on the controller.
      Parameters:
      value - the new value
    • setStartButton

      public void setStartButton(boolean value)
      Change the value of the Start button on the controller.
      Parameters:
      value - the new value
    • setLeftStickButton

      public void setLeftStickButton(boolean value)
      Change the value of the left stick button on the controller.
      Parameters:
      value - the new value
    • setRightStickButton

      public void setRightStickButton(boolean value)
      Change the value of the right stick button on the controller.
      Parameters:
      value - the new value
    • setLeftBumperButton

      public void setLeftBumperButton(boolean value)
      Change the value of the right bumper button on the controller.
      Parameters:
      value - the new value
    • setRightBumperButton

      public void setRightBumperButton(boolean value)
      Change the value of the right bumper button on the controller.
      Parameters:
      value - the new value
    • setDpadUpButton

      public void setDpadUpButton(boolean value)
      Change the value of the D-pad up button on the controller.
      Parameters:
      value - the new value
    • setDpadDownButton

      public void setDpadDownButton(boolean value)
      Change the value of the D-pad down button on the controller.
      Parameters:
      value - the new value
    • setDpadLeftButton

      public void setDpadLeftButton(boolean value)
      Change the value of the D-pad left button on the controller.
      Parameters:
      value - the new value
    • setDpadRightButton

      public void setDpadRightButton(boolean value)
      Change the value of the D-pad right button on the controller.
      Parameters:
      value - the new value
    • setMisc1Button

      public void setMisc1Button(boolean value)
      Change the value of the Miscellaneous 1 button on the controller.
      Parameters:
      value - the new value
    • setRightPaddle1Button

      public void setRightPaddle1Button(boolean value)
      Change the value of the Right Paddle 1 button on the controller.
      Parameters:
      value - the new value
    • setLeftPaddle1Button

      public void setLeftPaddle1Button(boolean value)
      Change the value of the Left Paddle 1 button on the controller.
      Parameters:
      value - the new value
    • setRightPaddle2Button

      public void setRightPaddle2Button(boolean value)
      Change the value of the Right Paddle 2 button on the controller.
      Parameters:
      value - the new value
    • setLeftPaddle2Button

      public void setLeftPaddle2Button(boolean value)
      Change the value of the Left Paddle 2 button on the controller.
      Parameters:
      value - the new value
    • setTouchpadButton

      public void setTouchpadButton(boolean value)
      Change the value of the Touchpad button on the controller.
      Parameters:
      value - the new value
    • setMisc2Button

      public void setMisc2Button(boolean value)
      Change the value of the Miscellaneous 2 button on the controller.
      Parameters:
      value - the new value
    • setMisc3Button

      public void setMisc3Button(boolean value)
      Change the value of the Miscellaneous 3 button on the controller.
      Parameters:
      value - the new value
    • setMisc4Button

      public void setMisc4Button(boolean value)
      Change the value of the Miscellaneous 4 button on the controller.
      Parameters:
      value - the new value
    • setMisc5Button

      public void setMisc5Button(boolean value)
      Change the value of the Miscellaneous 5 button on the controller.
      Parameters:
      value - the new value
    • setMisc6Button

      public void setMisc6Button(boolean value)
      Change the value of the Miscellaneous 6 button on the controller.
      Parameters:
      value - the new value