Class NiDsPS4ControllerSim

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

public class NiDsPS4ControllerSim extends GenericHIDSim
Class to control a simulated NiDsPS4 controller.
  • Constructor Details

    • NiDsPS4ControllerSim

      Constructs from a NiDsPS4Controller object.
      Parameters:
      joystick - controller to simulate
    • NiDsPS4ControllerSim

      public NiDsPS4ControllerSim(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
    • setL2Axis

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

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

      public void setSquareButton(boolean value)
      Change the value of the square button on the controller.
      Parameters:
      value - the new value
    • setCrossButton

      public void setCrossButton(boolean value)
      Change the value of the cross button on the controller.
      Parameters:
      value - the new value
    • setCircleButton

      public void setCircleButton(boolean value)
      Change the value of the circle button on the controller.
      Parameters:
      value - the new value
    • setTriangleButton

      public void setTriangleButton(boolean value)
      Change the value of the triangle button on the controller.
      Parameters:
      value - the new value
    • setL1Button

      public void setL1Button(boolean value)
      Change the value of the left trigger 1 button on the controller.
      Parameters:
      value - the new value
    • setR1Button

      public void setR1Button(boolean value)
      Change the value of the right trigger 1 button on the controller.
      Parameters:
      value - the new value
    • setL2Button

      public void setL2Button(boolean value)
      Change the value of the left trigger 2 button on the controller.
      Parameters:
      value - the new value
    • setR2Button

      public void setR2Button(boolean value)
      Change the value of the right trigger 2 button on the controller.
      Parameters:
      value - the new value
    • setShareButton

      public void setShareButton(boolean value)
      Change the value of the share button on the controller.
      Parameters:
      value - the new value
    • setOptionsButton

      public void setOptionsButton(boolean value)
      Change the value of the options button on the controller.
      Parameters:
      value - the new value
    • setL3Button

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

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

      public void setPSButton(boolean value)
      Change the value of the PlayStation 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