Class DualShock4ControllerSim

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

public class DualShock4ControllerSim extends GenericHIDSim
Class to control a simulated DualShock4 controller.
  • Constructor Details

    • DualShock4ControllerSim

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

      public DualShock4ControllerSim(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.
      Parameters:
      value - the new value
    • setLeftY

      public void setLeftY(double value)
      Change the Left Y value of the controller.
      Parameters:
      value - the new value
    • setRightX

      public void setRightX(double value)
      Change the Right X value of the controller.
      Parameters:
      value - the new value
    • setRightY

      public void setRightY(double value)
      Change the Right Y value of the controller.
      Parameters:
      value - the new value
    • setL2

      public void setL2(double value)
      Change the L 2 value of the controller.
      Parameters:
      value - the new value
    • setR2

      public void setR2(double value)
      Change the R 2 value of 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
    • setSquareButton

      public void setSquareButton(boolean value)
      Change the value of the Square 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
    • setShareButton

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

      public void setPSButton(boolean value)
      Change the value of the PS 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 L 3 button on the controller.
      Parameters:
      value - the new value
    • setR3Button

      public void setR3Button(boolean value)
      Change the value of the R 3 button on the controller.
      Parameters:
      value - the new value
    • setL1Button

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

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

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

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

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

      public void setDpadRightButton(boolean value)
      Change the value of the Dpad Right 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