XboxControllerSim

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

Bases: GenericHIDSim

Class to control a simulated Xbox 360 or Xbox One controller.

Overloaded function.

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

Constructs from a XboxController object.

Parameters:

joystick – controller to simulate

  1. __init__(self: wpilib.simulation._simulation.XboxControllerSim, port: int) -> None

Constructs from a joystick port number.

Parameters:

port – port number

setAButton(value: bool) None

Change the value of the A button.

Parameters:

value – the new value

setBButton(value: bool) None

Change the value of the B button.

Parameters:

value – the new value

setBackButton(value: bool) None

Change the value of the Back button.

Parameters:

value – the new value

setLeftBumper(value: bool) None

Change the left bumper value of the joystick.

Parameters:

value – the new value

setLeftStickButton(value: bool) None

Change the left button value of the joystick.

Parameters:

value – the new value

setLeftTriggerAxis(value: float) None

Change the left trigger axis value of the joystick.

Parameters:

value – the new value

setLeftX(value: float) None

Change the X axis value of the controller’s left stick.

Parameters:

value – the new value

setLeftY(value: float) None

Change the Y axis value of the controller’s left stick.

Parameters:

value – the new value

setRightBumper(value: bool) None

Change the right bumper value of the joystick.

Parameters:

value – the new value

setRightStickButton(value: bool) None

Change the right button value of the joystick.

Parameters:

value – the new value

setRightTriggerAxis(value: float) None

Change the right trigger axis value of the joystick.

Parameters:

value – the new value

setRightX(value: float) None

Change the X axis value of the controller’s right stick.

Parameters:

value – the new value

setRightY(value: float) None

Change the Y axis value of the controller’s right stick.

Parameters:

value – the new value

setStartButton(value: bool) None

Change the value of the Start button.

Parameters:

value – the new value

setXButton(value: bool) None

Change the value of the X button.

Parameters:

value – the new value

setYButton(value: bool) None

Change the value of the Y button.

Parameters:

value – the new value