NiDsPS4ControllerSim
- class wpilib.simulation.NiDsPS4ControllerSim(*args, **kwargs)
Bases:
GenericHIDSimClass to control a simulated NiDsPS4 controller.
Overloaded function.
__init__(self: wpilib.simulation._simulation.NiDsPS4ControllerSim, joystick: wpilib._wpilib.NiDsPS4Controller) -> None
Constructs from a NiDsPS4Controller object.
- Parameters:
joystick – controller to simulate
__init__(self: wpilib.simulation._simulation.NiDsPS4ControllerSim, port: typing.SupportsInt | typing.SupportsIndex) -> None
Constructs from a joystick port number.
- Parameters:
port – port number
- setCircleButton(value: bool) None
Change the value of the circle button on the controller.
- Parameters:
value – the new value
- setCrossButton(value: bool) None
Change the value of the cross button on the controller.
- Parameters:
value – the new value
- setL1Button(value: bool) None
Change the value of the left trigger 1 button on the controller.
- Parameters:
value – the new value
- setL2Axis(value: SupportsFloat | SupportsIndex) None
Change the value of the left trigger 2 axis on the controller.
- Parameters:
value – the new value
- setL2Button(value: bool) None
Change the value of the left trigger 2 button on the controller.
- Parameters:
value – the new value
- setL3Button(value: bool) None
Change the value of the L3 (left stick) button on the controller.
- Parameters:
value – the new value
- setLeftX(value: SupportsFloat | SupportsIndex) None
Change the left X value of the controller’s joystick.
- Parameters:
value – the new value
- setLeftY(value: SupportsFloat | SupportsIndex) None
Change the left Y value of the controller’s joystick.
- Parameters:
value – the new value
- setOptionsButton(value: bool) None
Change the value of the options button on the controller.
- Parameters:
value – the new value
- setPSButton(value: bool) None
Change the value of the PlayStation button on the controller.
- Parameters:
value – the new value
- setR1Button(value: bool) None
Change the value of the right trigger 1 button on the controller.
- Parameters:
value – the new value
- setR2Axis(value: SupportsFloat | SupportsIndex) None
Change the value of the right trigger 2 axis on the controller.
- Parameters:
value – the new value
- setR2Button(value: bool) None
Change the value of the right trigger 2 button on the controller.
- Parameters:
value – the new value
- setR3Button(value: bool) None
Change the value of the R3 (right stick) button on the controller.
- Parameters:
value – the new value
- setRightX(value: SupportsFloat | SupportsIndex) None
Change the right X value of the controller’s joystick.
- Parameters:
value – the new value
- setRightY(value: SupportsFloat | SupportsIndex) None
Change the right Y value of the controller’s joystick.
- Parameters:
value – the new value
Change the value of the share button on the controller.
- Parameters:
value – the new value
- setSquareButton(value: bool) None
Change the value of the square button on the controller.
- Parameters:
value – the new value
- setTouchpadButton(value: bool) None
Change the value of the touchpad button on the controller.
- Parameters:
value – the new value
- setTriangleButton(value: bool) None
Change the value of the triangle button on the controller.
- Parameters:
value – the new value