GamepadSim
- class wpilib.simulation.GamepadSim(*args, **kwargs)
Bases:
GenericHIDSimClass to control a simulated Gamepad controller.
Overloaded function.
__init__(self: wpilib.simulation._simulation.GamepadSim, joystick: wpilib._wpilib.Gamepad) -> None
Constructs from a Gamepad object.
- Parameters:
joystick – controller to simulate
__init__(self: wpilib.simulation._simulation.GamepadSim, port: typing.SupportsInt | typing.SupportsIndex) -> None
Constructs from a joystick port number.
- Parameters:
port – port number
- set_axis(axis: wpilib._wpilib.Gamepad.Axis, value: SupportsFloat | SupportsIndex) None
Set the value of a given axis.
- Parameters:
axis – the axis to set
value – the new value
- set_back_button(value: bool) None
Change the value of the Back button on the controller.
- Parameters:
value – the new value
- set_button(button: wpilib._wpilib.Gamepad.Button, value: bool) None
Set the value of a given button.
- Parameters:
button – the button to set
value – the new value
- set_dpad_down_button(value: bool) None
Change the value of the D-pad down button on the controller.
- Parameters:
value – the new value
- set_dpad_left_button(value: bool) None
Change the value of the D-pad left button on the controller.
- Parameters:
value – the new value
- set_dpad_right_button(value: bool) None
Change the value of the D-pad right button on the controller.
- Parameters:
value – the new value
- set_dpad_up_button(value: bool) None
Change the value of the D-pad up button on the controller.
- Parameters:
value – the new value
- set_face_down_button(value: bool) None
Change the value of the Face Down button on the controller.
- Parameters:
value – the new value
- set_face_left_button(value: bool) None
Change the value of the Face Left button on the controller.
- Parameters:
value – the new value
- set_face_right_button(value: bool) None
Change the value of the Face Right button on the controller.
- Parameters:
value – the new value
- set_face_up_button(value: bool) None
Change the value of the Face Up button on the controller.
- Parameters:
value – the new value
- set_guide_button(value: bool) None
Change the value of the Guide button on the controller.
- Parameters:
value – the new value
- set_left_bumper_button(value: bool) None
Change the value of the right bumper button on the controller.
- Parameters:
value – the new value
- set_left_paddle1_button(value: bool) None
Change the value of the Left Paddle 1 button on the controller.
- Parameters:
value – the new value
- set_left_paddle2_button(value: bool) None
Change the value of the Left Paddle 2 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_trigger_axis(value: SupportsFloat | SupportsIndex) None
Change the value of the left trigger axis 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_misc1_button(value: bool) None
Change the value of the Miscellaneous 1 button on the controller.
- Parameters:
value – the new value
- set_misc2_button(value: bool) None
Change the value of the Miscellaneous 2 button on the controller.
- Parameters:
value – the new value
- set_misc3_button(value: bool) None
Change the value of the Miscellaneous 3 button on the controller.
- Parameters:
value – the new value
- set_misc4_button(value: bool) None
Change the value of the Miscellaneous 4 button on the controller.
- Parameters:
value – the new value
- set_misc5_button(value: bool) None
Change the value of the Miscellaneous 5 button on the controller.
- Parameters:
value – the new value
- set_misc6_button(value: bool) None
Change the value of the Miscellaneous 6 button on the controller.
- Parameters:
value – the new value
- set_right_bumper_button(value: bool) None
Change the value of the right bumper button on the controller.
- Parameters:
value – the new value
- set_right_paddle1_button(value: bool) None
Change the value of the Right Paddle 1 button on the controller.
- Parameters:
value – the new value
- set_right_paddle2_button(value: bool) None
Change the value of the Right Paddle 2 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_trigger_axis(value: SupportsFloat | SupportsIndex) None
Change the value of the right trigger axis 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_start_button(value: bool) None
Change the value of the Start 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