Class CommandSteamController
java.lang.Object
org.wpilib.command3.button.CommandSteamController
A version of
SteamController with Trigger factories for command-based.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCommandSteamController(int port) Construct an instance of a controller.CommandSteamController(Scheduler scheduler, int port) Construct an instance of a controller.CommandSteamController(Scheduler scheduler, SteamController controller) Construct an instance of a controller.CommandSteamController(SteamController controller) Construct an instance of a controller. -
Method Summary
Modifier and TypeMethodDescriptiona()Constructs a Trigger instance around the A button's digital signal.Constructs a Trigger instance around the A button's digital signal.b()Constructs a Trigger instance around the B button's digital signal.Constructs a Trigger instance around the B button's digital signal.dpadDown()Constructs a Trigger instance around the Dpad Down button's digital signal.Constructs a Trigger instance around the Dpad Down button's digital signal.dpadLeft()Constructs a Trigger instance around the Dpad Left button's digital signal.Constructs a Trigger instance around the Dpad Left button's digital signal.Constructs a Trigger instance around the Dpad Right button's digital signal.Constructs a Trigger instance around the Dpad Right button's digital signal.dpadUp()Constructs a Trigger instance around the Dpad Up button's digital signal.Constructs a Trigger instance around the Dpad Up button's digital signal.Get the wrapped controller object.getHID()Get the underlying CommandGenericHID object.doubleGet the Left Trigger value of the controller.doublegetLeftX()Get the Left X value of the controller.doublegetLeftY()Get the Left Y value of the controller.doubleGet the Right Trigger value of the controller.doubleGet the Right X value of the controller.doubleGet the Right Y value of the controller.Constructs a Trigger instance around the Left Bumper button's digital signal.leftBumper(EventLoop loop) Constructs a Trigger instance around the Left Bumper button's digital signal.Constructs a Trigger instance around the Left Grip Touch button's digital signal.leftGripTouch(EventLoop loop) Constructs a Trigger instance around the Left Grip Touch button's digital signal.Constructs a Trigger instance around the Left Paddle 1 button's digital signal.leftPaddle1(EventLoop loop) Constructs a Trigger instance around the Left Paddle 1 button's digital signal.Constructs a Trigger instance around the Left Paddle 2 button's digital signal.leftPaddle2(EventLoop loop) Constructs a Trigger instance around the Left Paddle 2 button's digital signal.Constructs a Trigger instance around the Left Stick button's digital signal.Constructs a Trigger instance around the Left Stick button's digital signal.Constructs a Trigger instance around the Left Stick Touch button's digital signal.leftStickTouch(EventLoop loop) Constructs a Trigger instance around the Left Stick Touch button's digital signal.Constructs a Trigger instance around the Left Touchpad button's digital signal.leftTouchpad(EventLoop loop) Constructs a Trigger instance around the Left Touchpad button's digital signal.Constructs a Trigger instance around the axis value of the Left Trigger.leftTrigger(double threshold) Constructs a Trigger instance around the axis value of the Left Trigger.leftTrigger(double threshold, EventLoop loop) Constructs a Trigger instance around the axis value of the Left Trigger.menu()Constructs a Trigger instance around the Menu button's digital signal.Constructs a Trigger instance around the Menu button's digital signal.QAM()Constructs a Trigger instance around the QAM button's digital signal.Constructs a Trigger instance around the QAM button's digital signal.Constructs a Trigger instance around the Right Bumper button's digital signal.rightBumper(EventLoop loop) Constructs a Trigger instance around the Right Bumper button's digital signal.Constructs a Trigger instance around the Right Grip Touch button's digital signal.rightGripTouch(EventLoop loop) Constructs a Trigger instance around the Right Grip Touch button's digital signal.Constructs a Trigger instance around the Right Paddle 1 button's digital signal.rightPaddle1(EventLoop loop) Constructs a Trigger instance around the Right Paddle 1 button's digital signal.Constructs a Trigger instance around the Right Paddle 2 button's digital signal.rightPaddle2(EventLoop loop) Constructs a Trigger instance around the Right Paddle 2 button's digital signal.Constructs a Trigger instance around the Right Stick button's digital signal.rightStick(EventLoop loop) Constructs a Trigger instance around the Right Stick button's digital signal.Constructs a Trigger instance around the Right Stick Touch button's digital signal.rightStickTouch(EventLoop loop) Constructs a Trigger instance around the Right Stick Touch button's digital signal.Constructs a Trigger instance around the Right Touchpad button's digital signal.rightTouchpad(EventLoop loop) Constructs a Trigger instance around the Right Touchpad button's digital signal.Constructs a Trigger instance around the axis value of the Right Trigger.rightTrigger(double threshold) Constructs a Trigger instance around the axis value of the Right Trigger.rightTrigger(double threshold, EventLoop loop) Constructs a Trigger instance around the axis value of the Right Trigger.steam()Constructs a Trigger instance around the Steam button's digital signal.Constructs a Trigger instance around the Steam button's digital signal.view()Constructs a Trigger instance around the View button's digital signal.Constructs a Trigger instance around the View button's digital signal.x()Constructs a Trigger instance around the X button's digital signal.Constructs a Trigger instance around the X button's digital signal.y()Constructs a Trigger instance around the Y button's digital signal.Constructs a Trigger instance around the Y button's digital signal.
-
Constructor Details
-
CommandSteamController
public CommandSteamController(int port) Construct an instance of a controller. Commands bound to buttons on the controller will be scheduled on thedefault schedulerusing its default event loop.- Parameters:
port- The port index on the Driver Station that the controller is plugged into.
-
CommandSteamController
Construct an instance of a controller. Commands bound to buttons on the controller will be scheduled on thedefault schedulerusing its default event loop.- Parameters:
controller- The SteamController object to use for this controller.
-
CommandSteamController
Construct an instance of a controller. Commands bound to buttons on the controller will be scheduled on the given scheduler using its default event loop.- Parameters:
scheduler- The scheduler that should execute the triggered commands.port- The port index on the Driver Station that the controller is plugged into.
-
CommandSteamController
Construct an instance of a controller. Commands bound to buttons on the controller will be scheduled on the given scheduler using its default event loop.- Parameters:
scheduler- The scheduler that should execute the triggered commands.controller- The SteamController object to use for this controller.
-
-
Method Details
-
getHID
Get the underlying CommandGenericHID object.- Returns:
- the wrapped CommandGenericHID object
-
getController
Get the wrapped controller object.- Returns:
- the wrapped controller object
-
a
Constructs a Trigger instance around the A button's digital signal.- Returns:
- a Trigger instance representing the A button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
a
-
b
Constructs a Trigger instance around the B button's digital signal.- Returns:
- a Trigger instance representing the B button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
b
-
x
Constructs a Trigger instance around the X button's digital signal.- Returns:
- a Trigger instance representing the X button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
x
-
y
Constructs a Trigger instance around the Y button's digital signal.- Returns:
- a Trigger instance representing the Y button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
y
-
steam
Constructs a Trigger instance around the Steam button's digital signal.- Returns:
- a Trigger instance representing the Steam button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
steam
-
view
Constructs a Trigger instance around the View button's digital signal.- Returns:
- a Trigger instance representing the View button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
view
-
leftStick
Constructs a Trigger instance around the Left Stick button's digital signal.- Returns:
- a Trigger instance representing the Left Stick button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
leftStick
-
rightStick
Constructs a Trigger instance around the Right Stick button's digital signal.- Returns:
- a Trigger instance representing the Right Stick button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
rightStick
-
leftBumper
Constructs a Trigger instance around the Left Bumper button's digital signal.- Returns:
- a Trigger instance representing the Left Bumper button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
leftBumper
-
rightBumper
Constructs a Trigger instance around the Right Bumper button's digital signal.- Returns:
- a Trigger instance representing the Right Bumper button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
rightBumper
-
dpadUp
Constructs a Trigger instance around the Dpad Up button's digital signal.- Returns:
- a Trigger instance representing the Dpad Up button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
dpadUp
-
dpadDown
Constructs a Trigger instance around the Dpad Down button's digital signal.- Returns:
- a Trigger instance representing the Dpad Down button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
dpadDown
-
dpadLeft
Constructs a Trigger instance around the Dpad Left button's digital signal.- Returns:
- a Trigger instance representing the Dpad Left button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
dpadLeft
-
dpadRight
Constructs a Trigger instance around the Dpad Right button's digital signal.- Returns:
- a Trigger instance representing the Dpad Right button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
dpadRight
-
QAM
Constructs a Trigger instance around the QAM button's digital signal.- Returns:
- a Trigger instance representing the QAM button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
QAM
-
rightPaddle1
Constructs a Trigger instance around the Right Paddle 1 button's digital signal.- Returns:
- a Trigger instance representing the Right Paddle 1 button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
rightPaddle1
Constructs a Trigger instance around the Right Paddle 1 button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the Right Paddle 1 button's digital signal attached to the given loop.
-
leftPaddle1
Constructs a Trigger instance around the Left Paddle 1 button's digital signal.- Returns:
- a Trigger instance representing the Left Paddle 1 button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
leftPaddle1
Constructs a Trigger instance around the Left Paddle 1 button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the Left Paddle 1 button's digital signal attached to the given loop.
-
rightPaddle2
Constructs a Trigger instance around the Right Paddle 2 button's digital signal.- Returns:
- a Trigger instance representing the Right Paddle 2 button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
rightPaddle2
Constructs a Trigger instance around the Right Paddle 2 button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the Right Paddle 2 button's digital signal attached to the given loop.
-
leftPaddle2
Constructs a Trigger instance around the Left Paddle 2 button's digital signal.- Returns:
- a Trigger instance representing the Left Paddle 2 button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
leftPaddle2
Constructs a Trigger instance around the Left Paddle 2 button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the Left Paddle 2 button's digital signal attached to the given loop.
-
leftTouchpad
Constructs a Trigger instance around the Left Touchpad button's digital signal.- Returns:
- a Trigger instance representing the Left Touchpad button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
leftTouchpad
Constructs a Trigger instance around the Left Touchpad button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the Left Touchpad button's digital signal attached to the given loop.
-
rightTouchpad
Constructs a Trigger instance around the Right Touchpad button's digital signal.- Returns:
- a Trigger instance representing the Right Touchpad button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
rightTouchpad
Constructs a Trigger instance around the Right Touchpad button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the Right Touchpad button's digital signal attached to the given loop.
-
leftStickTouch
Constructs a Trigger instance around the Left Stick Touch button's digital signal.- Returns:
- a Trigger instance representing the Left Stick Touch button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
leftStickTouch
Constructs a Trigger instance around the Left Stick Touch button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the Left Stick Touch button's digital signal attached to the given loop.
-
rightStickTouch
Constructs a Trigger instance around the Right Stick Touch button's digital signal.- Returns:
- a Trigger instance representing the Right Stick Touch button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
rightStickTouch
Constructs a Trigger instance around the Right Stick Touch button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the Right Stick Touch button's digital signal attached to the given loop.
-
leftGripTouch
Constructs a Trigger instance around the Left Grip Touch button's digital signal.- Returns:
- a Trigger instance representing the Left Grip Touch button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
leftGripTouch
Constructs a Trigger instance around the Left Grip Touch button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the Left Grip Touch button's digital signal attached to the given loop.
-
rightGripTouch
Constructs a Trigger instance around the Right Grip Touch button's digital signal.- Returns:
- a Trigger instance representing the Right Grip Touch button's digital signal attached
to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided. - See Also:
-
rightGripTouch
Constructs a Trigger instance around the Right Grip Touch button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the Right Grip Touch button's digital signal attached to the given loop.
-
leftTrigger
Constructs a Trigger instance around the axis value of the Left Trigger. The returned trigger will be true when the axis value is greater thanthreshold.- Parameters:
threshold- the minimum axis value for the returnedTriggerto 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 Trigger to.- Returns:
- a Trigger instance that is true when the Left Trigger axis exceeds the provided threshold, attached to the given event loop
-
leftTrigger
Constructs a Trigger instance around the axis value of the Left Trigger. The returned trigger will be true when the axis value is greater thanthreshold.- Parameters:
threshold- the minimum axis value for the returnedTriggerto be true. This value should be in the range [0, 1] where 0 is the unpressed state of the axis.- Returns:
- a Trigger instance that is true when the Left Trigger axis exceeds the provided
threshold, attached to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided.
-
leftTrigger
Constructs a Trigger instance around the axis value of the Left Trigger. The returned trigger will be true when the axis value is greater than 0.5.- Returns:
- a Trigger instance that is true when the Left Trigger axis exceeds 0.5, attached to
the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided.
-
rightTrigger
Constructs a Trigger instance around the axis value of the Right Trigger. The returned trigger will be true when the axis value is greater thanthreshold.- Parameters:
threshold- the minimum axis value for the returnedTriggerto 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 Trigger to.- Returns:
- a Trigger instance that is true when the Right Trigger axis exceeds the provided threshold, attached to the given event loop
-
rightTrigger
Constructs a Trigger instance around the axis value of the Right Trigger. The returned trigger will be true when the axis value is greater thanthreshold.- Parameters:
threshold- the minimum axis value for the returnedTriggerto be true. This value should be in the range [0, 1] where 0 is the unpressed state of the axis.- Returns:
- a Trigger instance that is true when the Right Trigger axis exceeds the provided
threshold, attached to the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided.
-
rightTrigger
Constructs a Trigger instance around the axis value of the Right Trigger. The returned trigger will be true when the axis value is greater than 0.5.- Returns:
- a Trigger instance that is true when the Right Trigger axis exceeds 0.5, attached to
the
default scheduler event loopon the scheduler passed to the controller's constructor, or thedefault schedulerif a scheduler was not explicitly provided.
-
getLeftX
public double getLeftX()Get the Left X value of the controller.- Returns:
- The axis value.
-
getLeftY
public double getLeftY()Get the Left Y value of the controller.- Returns:
- The axis value.
-
getRightX
public double getRightX()Get the Right X value of the controller.- Returns:
- The axis value.
-
getRightY
public double getRightY()Get the Right Y value of the controller.- Returns:
- The axis value.
-
getLeftTrigger
public double getLeftTrigger()Get the Left Trigger value of the controller.- Returns:
- The axis value.
-
getRightTrigger
public double getRightTrigger()Get the Right Trigger value of the controller.- Returns:
- The axis value.
-