NiDsPS5ControllerSim

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

Bases: GenericHIDSim

Class to control a simulated NiDsPS5 controller.

Overloaded function.

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

Constructs from a NiDsPS5Controller object.

Parameters:

joystick – controller to simulate

  1. __init__(self: wpilib.simulation._simulation.NiDsPS5ControllerSim, port: typing.SupportsInt | typing.SupportsIndex) -> None

Constructs from a joystick port number.

Parameters:

port – port number

set_circle_button(value: bool) None

Change the value of the circle button on the controller.

Parameters:

value – the new value

set_create_button(value: bool) None

Change the value of the create button on the controller.

Parameters:

value – the new value

set_cross_button(value: bool) None

Change the value of the cross button on the controller.

Parameters:

value – the new value

set_l1_button(value: bool) None

Change the value of the left trigger 1 button on the controller.

Parameters:

value – the new value

set_l2_axis(value: SupportsFloat | SupportsIndex) None

Change the value of the left trigger 2 axis on the controller.

Parameters:

value – the new value

set_l2_button(value: bool) None

Change the value of the left trigger 2 button on the controller.

Parameters:

value – the new value

set_l3_button(value: bool) None

Change the value of the L3 (left stick) button on the controller.

Parameters:

value – the new value

set_left_x(value: SupportsFloat | SupportsIndex) None

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

Parameters:

value – the new value

set_left_y(value: SupportsFloat | SupportsIndex) None

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

Parameters:

value – the new value

set_options_button(value: bool) None

Change the value of the options button on the controller.

Parameters:

value – the new value

set_ps_button(value: bool) None

Change the value of the PlayStation button on the controller.

Parameters:

value – the new value

set_r1_button(value: bool) None

Change the value of the right trigger 1 button on the controller.

Parameters:

value – the new value

set_r2_axis(value: SupportsFloat | SupportsIndex) None

Change the value of the right trigger 2 axis on the controller.

Parameters:

value – the new value

set_r2_button(value: bool) None

Change the value of the right trigger 2 button on the controller.

Parameters:

value – the new value

set_r3_button(value: bool) None

Change the value of the R3 (right stick) button on the controller.

Parameters:

value – the new value

set_right_x(value: SupportsFloat | SupportsIndex) None

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

Parameters:

value – the new value

set_right_y(value: SupportsFloat | SupportsIndex) None

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

Parameters:

value – the new value

set_square_button(value: bool) None

Change the value of the square button on the controller.

Parameters:

value – the new value

set_touchpad_button(value: bool) None

Change the value of the touchpad button on the controller.

Parameters:

value – the new value

set_triangle_button(value: bool) None

Change the value of the triangle button on the controller.

Parameters:

value – the new value