NiDsXboxControllerSim

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

Bases: GenericHIDSim

Class to control a simulated NiDsXbox controller.

Overloaded function.

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

Constructs from a NiDsXboxController object.

Parameters:

joystick – controller to simulate

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

Constructs from a joystick port number.

Parameters:

port – port number

setAButton(value: bool) None

Change the value of the A button on the controller.

Parameters:

value – the new value

setBButton(value: bool) None

Change the value of the B button on the controller.

Parameters:

value – the new value

setBackButton(value: bool) None

Change the value of the back button on the controller.

Parameters:

value – the new value

setLeftBumperButton(value: bool) None

Change the value of the left bumper button on the controller.

Parameters:

value – the new value

setLeftStickButton(value: bool) None

Change the value of the left stick button on the controller.

Parameters:

value – the new value

setLeftTriggerAxis(value: SupportsFloat | SupportsIndex) None

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

Parameters:

value – the new value

setLeftX(value: SupportsFloat | SupportsIndex) None

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

Parameters:

value – the new value

setLeftY(value: SupportsFloat | SupportsIndex) None

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

Parameters:

value – the new value

setRightBumperButton(value: bool) None

Change the value of the right bumper button on the controller.

Parameters:

value – the new value

setRightStickButton(value: bool) None

Change the value of the right stick button on the controller.

Parameters:

value – the new value

setRightTriggerAxis(value: SupportsFloat | SupportsIndex) None

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

Parameters:

value – the new value

setRightX(value: SupportsFloat | SupportsIndex) None

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

Parameters:

value – the new value

setRightY(value: SupportsFloat | SupportsIndex) None

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

Parameters:

value – the new value

setStartButton(value: bool) None

Change the value of the start button on the controller.

Parameters:

value – the new value

setXButton(value: bool) None

Change the value of the X button on the controller.

Parameters:

value – the new value

setYButton(value: bool) None

Change the value of the Y button on the controller.

Parameters:

value – the new value