PS5ControllerSim

class wpilib.simulation.PS5ControllerSim(*args, **kwargs)

Bases: GenericHIDSim

Class to control a simulated PS5 controller.

Overloaded function.

  1. __init__(self: wpilib.simulation._simulation.PS5ControllerSim, joystick: wpilib._wpilib.PS5Controller) -> None

Constructs from a PS5Controller object.

Parameters:

joystick – controller to simulate

  1. __init__(self: wpilib.simulation._simulation.PS5ControllerSim, port: typing.SupportsInt) -> 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

setCreateButton(value: bool) None

Change the value of the create 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) 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) None

Change the left X value of the controller’s joystick.

Parameters:

value – the new value

setLeftY(value: SupportsFloat) 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) 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) None

Change the right X value of the controller’s joystick.

Parameters:

value – the new value

setRightY(value: SupportsFloat) None

Change the right Y value of the controller’s joystick.

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