Switch2ProControllerSim
- class wpilib.simulation.Switch2ProControllerSim(*args, **kwargs)
Bases:
GenericHIDSimClass to control a simulated Switch2Pro controller.
Overloaded function.
__init__(self: wpilib.simulation._simulation.Switch2ProControllerSim, joystick: wpilib._wpilib.Switch2ProController) -> None
Constructs from a Switch2ProController object.
- Parameters:
joystick – controller to simulate
__init__(self: wpilib.simulation._simulation.Switch2ProControllerSim, port: typing.SupportsInt | typing.SupportsIndex) -> None
Constructs from a joystick port number.
- Parameters:
port – port number
- set_a_button(value: bool) None
Change the value of the A button on the controller.
- Parameters:
value – the new value
- set_b_button(value: bool) None
Change the value of the B button on the controller.
- Parameters:
value – the new value
- set_c_button(value: bool) None
Change the value of the C button on the controller.
- Parameters:
value – the new value
- set_capture_button(value: bool) None
Change the value of the Capture 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_gl_button(value: bool) None
Change the value of the GL button on the controller.
- Parameters:
value – the new value
- set_gr_button(value: bool) None
Change the value of the GR button on the controller.
- Parameters:
value – the new value
- set_home_button(value: bool) None
Change the value of the Home button on the controller.
- Parameters:
value – the new value
- set_l_button(value: bool) None
Change the value of the L button on the controller.
- Parameters:
value – the new value
- set_left_stick_button(value: bool) None
Change the value of the 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.
- 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_minus_button(value: bool) None
Change the value of the Minus button on the controller.
- Parameters:
value – the new value
- set_plus_button(value: bool) None
Change the value of the Plus button on the controller.
- Parameters:
value – the new value
- set_r_button(value: bool) None
Change the value of the R button on the controller.
- Parameters:
value – the new value
- set_right_stick_button(value: bool) None
Change the value of the 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.
- 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_x_button(value: bool) None
Change the value of the X button on the controller.
- Parameters:
value – the new value
- set_y_button(value: bool) None
Change the value of the Y button on the controller.
- Parameters:
value – the new value
- set_zl(value: SupportsFloat | SupportsIndex) None
Change the ZL value of the controller.
- Parameters:
value – the new value
- set_zr(value: SupportsFloat | SupportsIndex) None
Change the ZR value of the controller.
- Parameters:
value – the new value