Class NiDsPS4ControllerSim
java.lang.Object
org.wpilib.simulation.GenericHIDSim
org.wpilib.simulation.NiDsPS4ControllerSim
Class to control a simulated NiDsPS4 controller.
-
Field Summary
Fields inherited from class GenericHIDSim
m_port -
Constructor Summary
ConstructorsConstructorDescriptionNiDsPS4ControllerSim(int port) Constructs from a joystick port number.NiDsPS4ControllerSim(NiDsPS4Controller joystick) Constructs from a NiDsPS4Controller object. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetCircleButton(boolean value) Change the value of the circle button on the controller.voidsetCrossButton(boolean value) Change the value of the cross button on the controller.voidsetL1Button(boolean value) Change the value of the left trigger 1 button on the controller.voidsetL2Axis(double value) Change the value of the left trigger 2 axis on the controller.voidsetL2Button(boolean value) Change the value of the left trigger 2 button on the controller.voidsetL3Button(boolean value) Change the value of the L3 (left stick) button 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.voidsetOptionsButton(boolean value) Change the value of the options button on the controller.voidsetPSButton(boolean value) Change the value of the PlayStation button on the controller.voidsetR1Button(boolean value) Change the value of the right trigger 1 button on the controller.voidsetR2Axis(double value) Change the value of the right trigger 2 axis on the controller.voidsetR2Button(boolean value) Change the value of the right trigger 2 button on the controller.voidsetR3Button(boolean value) Change the value of the R3 (right stick) button 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.voidsetShareButton(boolean value) Change the value of the share button on 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
-
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
-
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
-