CommandGamepad

class CommandGamepad @JvmOverloads constructor(eventLoop: EventLoop = Trigger.defaultEventLoop, gamepad: Gamepad)

A wrapper around the standard FTC Gamepad that exposes its buttons as command-based Triggers.

This allows you to easily map controller inputs directly to Ivy commands using the WPILib-style Trigger API (e.g., gamepad.a.onTrue(scoreCommand)).

Parameters

eventLoop

The event loop to bind the button triggers to.

gamepad

The underlying FTC gamepad instance to read data from.

Constructors

Link copied to clipboard
constructor(eventLoop: EventLoop = Trigger.defaultEventLoop, gamepad: Gamepad)

Properties

Link copied to clipboard
@get:JvmName(name = "a")
val a: Trigger

A trigger that evaluates to true when the A button (cross on PlayStation) is pressed.

Link copied to clipboard
@get:JvmName(name = "b")
val b: Trigger

A trigger that evaluates to true when the B button (circle on PlayStation) is pressed.

Link copied to clipboard
@get:JvmName(name = "back")
val back: Trigger

A trigger that evaluates to true when the back button is pressed.

Link copied to clipboard
@get:JvmName(name = "circle")
val circle: Trigger

A trigger that evaluates to true when the circle button (B on Xbox) is pressed.

Link copied to clipboard
@get:JvmName(name = "cross")
val cross: Trigger

A trigger that evaluates to true when the cross button (A on Xbox) is pressed.

Link copied to clipboard
@get:JvmName(name = "dpadDown")
val dpadDown: Trigger

A trigger that evaluates to true when the d-pad down is pressed.

Link copied to clipboard
@get:JvmName(name = "dpadLeft")
val dpadLeft: Trigger

A trigger that evaluates to true when the d-pad left is pressed.

Link copied to clipboard
@get:JvmName(name = "dpadRight")
val dpadRight: Trigger

A trigger that evaluates to true when the d-pad right is pressed.

Link copied to clipboard
@get:JvmName(name = "dpadUp")
val dpadUp: Trigger

A trigger that evaluates to true when the d-pad up is pressed.

Link copied to clipboard
@get:JvmName(name = "leftBumper")
val leftBumper: Trigger

A trigger that evaluates to true when the left bumper is pressed.

Link copied to clipboard
@get:JvmName(name = "leftStickButton")
val leftStickButton: Trigger

A trigger that evaluates to true when the left stick is clicked.

Link copied to clipboard
@get:JvmName(name = "leftStickX")
val leftStickX: RangeTrigger

A range trigger that evaluates to how far the x value of the left stick is moved.

Link copied to clipboard
@get:JvmName(name = "leftStickY")
val leftStickY: RangeTrigger

A range trigger that evaluates to how far the y value of the left stick is moved.

Link copied to clipboard
@get:JvmName(name = "leftTrigger")
val leftTrigger: RangeTrigger

A range trigger that evaluates to how far the left trigger is pressed.

Link copied to clipboard
@get:JvmName(name = "rightBumper")
val rightBumper: Trigger

A trigger that evaluates to true when the right bumper is pressed.

Link copied to clipboard
@get:JvmName(name = "rightStickButton")
val rightStickButton: Trigger

A trigger that evaluates to true when the right stick is clicked.

Link copied to clipboard
@get:JvmName(name = "rightStickX")
val rightStickX: RangeTrigger

A range trigger that evaluates to how far the x value of the right stick is moved.

Link copied to clipboard
@get:JvmName(name = "rightStickY")
val rightStickY: RangeTrigger

A range trigger that evaluates to how far the y value of the right stick is moved.

Link copied to clipboard
@get:JvmName(name = "rightTrigger")
val rightTrigger: RangeTrigger

A range trigger that evaluates to how far the right trigger is pressed.

Link copied to clipboard
@get:JvmName(name = "square")
val square: Trigger

A trigger that evaluates to true when the square button (X on Xbox) is pressed.

Link copied to clipboard
@get:JvmName(name = "start")
val start: Trigger

A trigger that evaluates to true when the start button is pressed.

Link copied to clipboard
@get:JvmName(name = "triangle")
val triangle: Trigger

A trigger that evaluates to true when the triangle button (Y on Xbox) is pressed.

Link copied to clipboard
@get:JvmName(name = "x")
val x: Trigger

A trigger that evaluates to true when the X button (square on PlayStation) is pressed.

Link copied to clipboard
@get:JvmName(name = "y")
val y: Trigger

A trigger that evaluates to true when the Y button (triangle on PlayStation) is pressed.