Gamepad
- class wpilib.Gamepad(port: SupportsInt | SupportsIndex)
Bases:
GenericHID,SendableHandle input from Gamepad controllers connected to the Driver Station.
This class handles Gamepad input that comes from the Driver Station. Each time a value is requested the most recent value is returned. There is a single class instance for each controller and the mapping of ports to hardware buttons depends on the code in the Driver Station.
Only first party controllers from Generic are guaranteed to have the correct mapping, and only through the official NI DS. Sim is not guaranteed to have the same mapping, as well as any 3rd party controllers.
Construct an instance of a controller.
The controller index is the USB port on the Driver Station.
- Parameters:
port – The port on the Driver Station that the controller is plugged into (0-5).
- class Axis(value: SupportsInt | SupportsIndex)
Bases:
pybind11_objectRepresents an axis on an Gamepad.
Members:
LEFT_X : Left X axis.
LEFT_Y : Left Y axis.
RIGHT_X : Right X axis.
RIGHT_Y : Right Y axis.
LEFT_TRIGGER : Left trigger.
RIGHT_TRIGGER : Right trigger.
- LEFT_TRIGGER = <Axis.LEFT_TRIGGER: 4>
- LEFT_X = <Axis.LEFT_X: 0>
- LEFT_Y = <Axis.LEFT_Y: 1>
- RIGHT_TRIGGER = <Axis.RIGHT_TRIGGER: 5>
- RIGHT_X = <Axis.RIGHT_X: 2>
- RIGHT_Y = <Axis.RIGHT_Y: 3>
- Gamepad.Axis.name -> str
- property value
- class Button(value: SupportsInt | SupportsIndex)
Bases:
pybind11_objectRepresents a digital button on an Gamepad.
Members:
SOUTH_FACE : South Face button.
EAST_FACE : East Face button.
WEST_FACE : West Face button.
NORTH_FACE : North Face button.
BACK : Back button.
GUIDE : Guide button.
START : Start button.
LEFT_STICK : Left stick button.
RIGHT_STICK : Right stick button.
LEFT_BUMPER : Left bumper button.
RIGHT_BUMPER : Right bumper button.
DPAD_UP : D-pad up button.
DPAD_DOWN : D-pad down button.
DPAD_LEFT : D-pad left button.
DPAD_RIGHT : D-pad right button.
MISC_1 : Miscellaneous 1 button.
RIGHT_PADDLE_1 : Right Paddle 1 button.
LEFT_PADDLE_1 : Left Paddle 1 button.
RIGHT_PADDLE_2 : Right Paddle 2 button.
LEFT_PADDLE_2 : Left Paddle 2 button.
TOUCHPAD : Touchpad button.
MISC_2 : Miscellaneous 2 button.
MISC_3 : Miscellaneous 3 button.
MISC_4 : Miscellaneous 4 button.
MISC_5 : Miscellaneous 5 button.
MISC_6 : Miscellaneous 6 button.
- BACK = <Button.BACK: 4>
- DPAD_DOWN = <Button.DPAD_DOWN: 12>
- DPAD_LEFT = <Button.DPAD_LEFT: 13>
- DPAD_RIGHT = <Button.DPAD_RIGHT: 14>
- DPAD_UP = <Button.DPAD_UP: 11>
- EAST_FACE = <Button.EAST_FACE: 1>
- GUIDE = <Button.GUIDE: 5>
- LEFT_BUMPER = <Button.LEFT_BUMPER: 9>
- LEFT_PADDLE_1 = <Button.LEFT_PADDLE_1: 17>
- LEFT_PADDLE_2 = <Button.LEFT_PADDLE_2: 19>
- LEFT_STICK = <Button.LEFT_STICK: 7>
- MISC_1 = <Button.MISC_1: 15>
- MISC_2 = <Button.MISC_2: 21>
- MISC_3 = <Button.MISC_3: 22>
- MISC_4 = <Button.MISC_4: 23>
- MISC_5 = <Button.MISC_5: 24>
- MISC_6 = <Button.MISC_6: 25>
- NORTH_FACE = <Button.NORTH_FACE: 3>
- RIGHT_BUMPER = <Button.RIGHT_BUMPER: 10>
- RIGHT_PADDLE_1 = <Button.RIGHT_PADDLE_1: 16>
- RIGHT_PADDLE_2 = <Button.RIGHT_PADDLE_2: 18>
- RIGHT_STICK = <Button.RIGHT_STICK: 8>
- SOUTH_FACE = <Button.SOUTH_FACE: 0>
- START = <Button.START: 6>
- TOUCHPAD = <Button.TOUCHPAD: 20>
- WEST_FACE = <Button.WEST_FACE: 2>
- Gamepad.Button.name -> str
- property value
- axisGreaterThan(axis: wpilib._wpilib.Gamepad.Axis, threshold: SupportsFloat | SupportsIndex, loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance that is true when the axis value is greater than threshold
- Parameters:
axis – The axis to read
threshold – The value above which this trigger should return true.
loop – the event loop instance to attach the event to.
- Returns:
an event instance that is true when the axis value is greater than the provided threshold.
- axisLessThan(axis: wpilib._wpilib.Gamepad.Axis, threshold: SupportsFloat | SupportsIndex, loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance that is true when the axis value is less than threshold
- Parameters:
axis – The axis to read
threshold – The value below which this trigger should return true.
loop – the event loop instance to attach the event to.
- Returns:
an event instance that is true when the axis value is less than the provided threshold.
- back(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the Back button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the Back button’s digital signal attached to the given loop.
- button(button: wpilib._wpilib.Gamepad.Button, loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around this button’s digital signal.
- Parameters:
button – the button
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the button’s digital signal attached to the given loop.
- dpadDown(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the D-pad down button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the D-pad down button’s digital signal attached to the given loop.
- dpadLeft(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the D-pad left button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the D-pad left button’s digital signal attached to the given loop.
- dpadRight(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the D-pad right button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the D-pad right button’s digital signal attached to the given loop.
- dpadUp(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the D-pad up button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the D-pad up button’s digital signal attached to the given loop.
- eastFace(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the East Face button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the East Face button’s digital signal attached to the given loop.
- getAxis(axis: wpilib._wpilib.Gamepad.Axis) float
Get the value of the axis.
- Parameters:
axis – The axis to read
- Returns:
The value of the axis.
- getBackButton() bool
Read the value of the Back button on the controller.
- Returns:
The state of the button.
- getBackButtonPressed() bool
Whether the Back button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getBackButtonReleased() bool
Whether the Back button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getButton(button: wpilib._wpilib.Gamepad.Button) bool
Get the button value.
This method returns true if the button is being held down at the time that this method is being called.
- Parameters:
button – The button
- Returns:
The state of the button.
- getButtonPressed(button: wpilib._wpilib.Gamepad.Button) bool
Whether the button was pressed since the last check.
This method returns true if the button went from not pressed to held down since the last time this method was called. This is useful if you only want to call a function once when you press the button.
- Parameters:
button – The button
- Returns:
Whether the button was pressed since the last check.
- getButtonReleased(button: wpilib._wpilib.Gamepad.Button) bool
Whether the button was released since the last check.
This method returns true if the button went from held down to not pressed since the last time this method was called. This is useful if you only want to call a function once when you release the button.
- Parameters:
button – The button
- Returns:
Whether the button was released since the last check.
- getDpadDownButton() bool
Read the value of the D-pad down button on the controller.
- Returns:
The state of the button.
- getDpadDownButtonPressed() bool
Whether the D-pad down button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getDpadDownButtonReleased() bool
Whether the D-pad down button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getDpadLeftButton() bool
Read the value of the D-pad left button on the controller.
- Returns:
The state of the button.
- getDpadLeftButtonPressed() bool
Whether the D-pad left button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getDpadLeftButtonReleased() bool
Whether the D-pad left button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getDpadRightButton() bool
Read the value of the D-pad right button on the controller.
- Returns:
The state of the button.
- getDpadRightButtonPressed() bool
Whether the D-pad right button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getDpadRightButtonReleased() bool
Whether the D-pad right button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getDpadUpButton() bool
Read the value of the D-pad up button on the controller.
- Returns:
The state of the button.
- getDpadUpButtonPressed() bool
Whether the D-pad up button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getDpadUpButtonReleased() bool
Whether the D-pad up button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getEastFaceButton() bool
Read the value of the East Face button on the controller.
- Returns:
The state of the button.
- getEastFaceButtonPressed() bool
Whether the East Face button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getEastFaceButtonReleased() bool
Whether the East Face button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getGuideButton() bool
Read the value of the Guide button on the controller.
- Returns:
The state of the button.
- getGuideButtonPressed() bool
Whether the Guide button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getGuideButtonReleased() bool
Whether the Guide button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getLeftBumperButton() bool
Read the value of the right bumper button on the controller.
- Returns:
The state of the button.
- getLeftBumperButtonPressed() bool
Whether the right bumper button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getLeftBumperButtonReleased() bool
Whether the right bumper button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getLeftPaddle1Button() bool
Read the value of the Left Paddle 1 button on the controller.
- Returns:
The state of the button.
- getLeftPaddle1ButtonPressed() bool
Whether the Left Paddle 1 button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getLeftPaddle1ButtonReleased() bool
Whether the Left Paddle 1 button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getLeftPaddle2Button() bool
Read the value of the Left Paddle 2 button on the controller.
- Returns:
The state of the button.
- getLeftPaddle2ButtonPressed() bool
Whether the Left Paddle 2 button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getLeftPaddle2ButtonReleased() bool
Whether the Left Paddle 2 button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getLeftStickButton() bool
Read the value of the left stick button on the controller.
- Returns:
The state of the button.
- getLeftStickButtonPressed() bool
Whether the left stick button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getLeftStickButtonReleased() bool
Whether the left stick button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getLeftTriggerAxis() float
Get the left trigger axis value of the controller. Note that this axis is bound to the range of [0, 1] as opposed to the usual [-1, 1].
- Returns:
the axis value.
- getLeftX() float
Get the X axis value of left side of the controller. Right is positive.
- Returns:
the axis value.
- getLeftY() float
Get the Y axis value of left side of the controller. Back is positive.
- Returns:
the axis value.
- getMisc1Button() bool
Read the value of the Miscellaneous 1 button on the controller.
- Returns:
The state of the button.
- getMisc1ButtonPressed() bool
Whether the Miscellaneous 1 button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getMisc1ButtonReleased() bool
Whether the Miscellaneous 1 button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getMisc2Button() bool
Read the value of the Miscellaneous 2 button on the controller.
- Returns:
The state of the button.
- getMisc2ButtonPressed() bool
Whether the Miscellaneous 2 button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getMisc2ButtonReleased() bool
Whether the Miscellaneous 2 button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getMisc3Button() bool
Read the value of the Miscellaneous 3 button on the controller.
- Returns:
The state of the button.
- getMisc3ButtonPressed() bool
Whether the Miscellaneous 3 button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getMisc3ButtonReleased() bool
Whether the Miscellaneous 3 button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getMisc4Button() bool
Read the value of the Miscellaneous 4 button on the controller.
- Returns:
The state of the button.
- getMisc4ButtonPressed() bool
Whether the Miscellaneous 4 button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getMisc4ButtonReleased() bool
Whether the Miscellaneous 4 button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getMisc5Button() bool
Read the value of the Miscellaneous 5 button on the controller.
- Returns:
The state of the button.
- getMisc5ButtonPressed() bool
Whether the Miscellaneous 5 button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getMisc5ButtonReleased() bool
Whether the Miscellaneous 5 button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getMisc6Button() bool
Read the value of the Miscellaneous 6 button on the controller.
- Returns:
The state of the button.
- getMisc6ButtonPressed() bool
Whether the Miscellaneous 6 button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getMisc6ButtonReleased() bool
Whether the Miscellaneous 6 button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getNorthFaceButton() bool
Read the value of the North Face button on the controller.
- Returns:
The state of the button.
- getNorthFaceButtonPressed() bool
Whether the North Face button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getNorthFaceButtonReleased() bool
Whether the North Face button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getRightBumperButton() bool
Read the value of the right bumper button on the controller.
- Returns:
The state of the button.
- getRightBumperButtonPressed() bool
Whether the right bumper button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getRightBumperButtonReleased() bool
Whether the right bumper button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getRightPaddle1Button() bool
Read the value of the Right Paddle 1 button on the controller.
- Returns:
The state of the button.
- getRightPaddle1ButtonPressed() bool
Whether the Right Paddle 1 button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getRightPaddle1ButtonReleased() bool
Whether the Right Paddle 1 button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getRightPaddle2Button() bool
Read the value of the Right Paddle 2 button on the controller.
- Returns:
The state of the button.
- getRightPaddle2ButtonPressed() bool
Whether the Right Paddle 2 button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getRightPaddle2ButtonReleased() bool
Whether the Right Paddle 2 button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getRightStickButton() bool
Read the value of the right stick button on the controller.
- Returns:
The state of the button.
- getRightStickButtonPressed() bool
Whether the right stick button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getRightStickButtonReleased() bool
Whether the right stick button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getRightTriggerAxis() float
Get the right trigger axis value of the controller. Note that this axis is bound to the range of [0, 1] as opposed to the usual [-1, 1].
- Returns:
the axis value.
- getRightX() float
Get the X axis value of right side of the controller. Right is positive.
- Returns:
the axis value.
- getRightY() float
Get the Y axis value of right side of the controller. Back is positive.
- Returns:
the axis value.
- getSouthFaceButton() bool
Read the value of the South Face button on the controller.
- Returns:
The state of the button.
- getSouthFaceButtonPressed() bool
Whether the South Face button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getSouthFaceButtonReleased() bool
Whether the South Face button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getStartButton() bool
Read the value of the Start button on the controller.
- Returns:
The state of the button.
- getStartButtonPressed() bool
Whether the Start button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getStartButtonReleased() bool
Whether the Start button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getTouchpadButton() bool
Read the value of the Touchpad button on the controller.
- Returns:
The state of the button.
- getTouchpadButtonPressed() bool
Whether the Touchpad button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getTouchpadButtonReleased() bool
Whether the Touchpad button was released since the last check.
- Returns:
Whether the button was released since the last check.
- getWestFaceButton() bool
Read the value of the West Face button on the controller.
- Returns:
The state of the button.
- getWestFaceButtonPressed() bool
Whether the West Face button was pressed since the last check.
- Returns:
Whether the button was pressed since the last check.
- getWestFaceButtonReleased() bool
Whether the West Face button was released since the last check.
- Returns:
Whether the button was released since the last check.
- guide(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the Guide button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the Guide button’s digital signal attached to the given loop.
- initSendable(builder: wpiutil._wpiutil.SendableBuilder) None
- leftBumper(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the right bumper button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the right bumper button’s digital signal attached to the given loop.
- leftPaddle1(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the Left Paddle 1 button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the Left Paddle 1 button’s digital signal attached to the given loop.
- leftPaddle2(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the Left Paddle 2 button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the Left Paddle 2 button’s digital signal attached to the given loop.
- leftStick(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the left stick button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the left stick button’s digital signal attached to the given loop.
- leftTrigger(*args, **kwargs)
Overloaded function.
leftTrigger(self: wpilib._wpilib.Gamepad, threshold: typing.SupportsFloat | typing.SupportsIndex, loop: wpilib._wpilib.EventLoop) -> wpilib._wpilib.BooleanEvent
Constructs an event instance around the axis value of the left trigger. The returned trigger will be true when the axis value is greater than
threshold.- Parameters:
threshold – the minimum axis value for the returned event to be true. This value should be in the range [0, 1] where 0 is the unpressed state of the axis.
loop – the event loop instance to attach the event to.
- Returns:
an event instance that is true when the left trigger’s axis exceeds the provided threshold, attached to the given event loop
leftTrigger(self: wpilib._wpilib.Gamepad, loop: wpilib._wpilib.EventLoop) -> wpilib._wpilib.BooleanEvent
Constructs an event instance around the axis value of the left trigger. The returned trigger will be true when the axis value is greater than 0.5.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance that is true when the left trigger’s axis exceeds 0.5, attached to the given event loop
- misc1(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the Miscellaneous 1 button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the Miscellaneous 1 button’s digital signal attached to the given loop.
- misc2(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the Miscellaneous 2 button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the Miscellaneous 2 button’s digital signal attached to the given loop.
- misc3(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the Miscellaneous 3 button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the Miscellaneous 3 button’s digital signal attached to the given loop.
- misc4(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the Miscellaneous 4 button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the Miscellaneous 4 button’s digital signal attached to the given loop.
- misc5(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the Miscellaneous 5 button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the Miscellaneous 5 button’s digital signal attached to the given loop.
- misc6(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the Miscellaneous 6 button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the Miscellaneous 6 button’s digital signal attached to the given loop.
- northFace(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the North Face button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the North Face button’s digital signal attached to the given loop.
- rightBumper(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the right bumper button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the right bumper button’s digital signal attached to the given loop.
- rightPaddle1(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the Right Paddle 1 button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the Right Paddle 1 button’s digital signal attached to the given loop.
- rightPaddle2(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the Right Paddle 2 button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the Right Paddle 2 button’s digital signal attached to the given loop.
- rightStick(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the right stick button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the right stick button’s digital signal attached to the given loop.
- rightTrigger(*args, **kwargs)
Overloaded function.
rightTrigger(self: wpilib._wpilib.Gamepad, threshold: typing.SupportsFloat | typing.SupportsIndex, loop: wpilib._wpilib.EventLoop) -> wpilib._wpilib.BooleanEvent
Constructs an event instance around the axis value of the right trigger. The returned trigger will be true when the axis value is greater than
threshold.- Parameters:
threshold – the minimum axis value for the returned event to be true. This value should be in the range [0, 1] where 0 is the unpressed state of the axis.
loop – the event loop instance to attach the event to.
- Returns:
an event instance that is true when the right trigger’s axis exceeds the provided threshold, attached to the given event loop
rightTrigger(self: wpilib._wpilib.Gamepad, loop: wpilib._wpilib.EventLoop) -> wpilib._wpilib.BooleanEvent
Constructs an event instance around the axis value of the right trigger. The returned trigger will be true when the axis value is greater than 0.5.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance that is true when the right trigger’s axis exceeds 0.5, attached to the given event loop
- southFace(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the South Face button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the South Face button’s digital signal attached to the given loop.
- start(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the Start button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the Start button’s digital signal attached to the given loop.
- touchpad(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the Touchpad button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the Touchpad button’s digital signal attached to the given loop.
- westFace(loop: wpilib._wpilib.EventLoop) wpilib._wpilib.BooleanEvent
Constructs an event instance around the West Face button’s digital signal.
- Parameters:
loop – the event loop instance to attach the event to.
- Returns:
an event instance representing the West Face button’s digital signal attached to the given loop.