Class DualSenseControllerSim
java.lang.Object
org.wpilib.simulation.GenericHIDSim
org.wpilib.simulation.DualSenseControllerSim
Class to control a simulated DualSense controller.
-
Field Summary
Fields inherited from class GenericHIDSim
m_port -
Constructor Summary
ConstructorsConstructorDescriptionDualSenseControllerSim(int port) Constructs from a joystick port number.DualSenseControllerSim(DualSenseController joystick) Constructs from a DualSenseController object. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetCircleButton(boolean value) Change the value of the Circle button on the controller.voidsetCreateButton(boolean value) Change the value of the Create button on the controller.voidsetCrossButton(boolean value) Change the value of the Cross button on the controller.voidsetDpadDownButton(boolean value) Change the value of the Dpad Down button on the controller.voidsetDpadLeftButton(boolean value) Change the value of the Dpad Left button on the controller.voidsetDpadRightButton(boolean value) Change the value of the Dpad Right button on the controller.voidsetDpadUpButton(boolean value) Change the value of the Dpad Up button on the controller.voidsetL1Button(boolean value) Change the value of the L 1 button on the controller.voidsetL2(double value) Change the L 2 value of the controller.voidsetL3Button(boolean value) Change the value of the L 3 button on the controller.voidsetLeftX(double value) Change the Left X value of the controller.voidsetLeftY(double value) Change the Left Y value of the controller.voidsetMicrophoneButton(boolean value) Change the value of the Microphone button on the controller.voidsetOptionsButton(boolean value) Change the value of the Options button on the controller.voidsetPSButton(boolean value) Change the value of the PS button on the controller.voidsetR1Button(boolean value) Change the value of the R 1 button on the controller.voidsetR2(double value) Change the R 2 value of the controller.voidsetR3Button(boolean value) Change the value of the R 3 button on the controller.voidsetRightX(double value) Change the Right X value of the controller.voidsetRightY(double value) Change the Right Y value of the controller.voidsetSquareButton(boolean value) Change the value of the Square button on the controller.voidsetTouchpadButton(boolean value) Change the value of the Touchpad button on the controller.voidsetTriangleButton(boolean value) Change the value of the Triangle 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
-
DualSenseControllerSim
Constructs from a DualSenseController object.- Parameters:
joystick- controller to simulate
-
DualSenseControllerSim
public DualSenseControllerSim(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
-
setCreateButton
public void setCreateButton(boolean value) Change the value of the Create 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
-
setMicrophoneButton
public void setMicrophoneButton(boolean value) Change the value of the Microphone 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
-