DualSenseControllerSim

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

Bases: GenericHIDSim

Class to control a simulated DualSense controller.

Overloaded function.

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

Constructs from a DualSenseController object.

Parameters:

joystick – controller to simulate

  1. __init__(self: wpilib.simulation._simulation.DualSenseControllerSim, 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_dpad_down_button(value: bool) None

Change the value of the Dpad Down button on the controller.

Parameters:

value – the new value

set_dpad_left_button(value: bool) None

Change the value of the Dpad Left button on the controller.

Parameters:

value – the new value

set_dpad_right_button(value: bool) None

Change the value of the Dpad Right button on the controller.

Parameters:

value – the new value

set_dpad_up_button(value: bool) None

Change the value of the Dpad Up button on the controller.

Parameters:

value – the new value

set_l1_button(value: bool) None

Change the value of the L 1 button on the controller.

Parameters:

value – the new value

set_l2(value: SupportsFloat | SupportsIndex) None

Change the L 2 value of the controller.

Parameters:

value – the new value

set_l3_button(value: bool) None

Change the value of the L 3 button on the controller.

Parameters:

value – the new value

set_left_x(value: SupportsFloat | SupportsIndex) None

Change the Left X value of the controller.

Parameters:

value – the new value

set_left_y(value: SupportsFloat | SupportsIndex) None

Change the Left Y value of the controller.

Parameters:

value – the new value

set_microphone_button(value: bool) None

Change the value of the Microphone button on the controller.

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 PS button on the controller.

Parameters:

value – the new value

set_r1_button(value: bool) None

Change the value of the R 1 button on the controller.

Parameters:

value – the new value

set_r2(value: SupportsFloat | SupportsIndex) None

Change the R 2 value of the controller.

Parameters:

value – the new value

set_r3_button(value: bool) None

Change the value of the R 3 button on the controller.

Parameters:

value – the new value

set_right_x(value: SupportsFloat | SupportsIndex) None

Change the Right X value of the controller.

Parameters:

value – the new value

set_right_y(value: SupportsFloat | SupportsIndex) None

Change the Right Y value of the controller.

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