Package org.wpilib.commands3.button
Class CommandStadiaController
java.lang.Object
org.wpilib.commands3.button.CommandGenericHID
org.wpilib.commands3.button.CommandStadiaController
A version of
StadiaController with Trigger factories for command-based.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCommandStadiaController(int port) Construct an instance of a controller.CommandStadiaController(Scheduler scheduler, int port) 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.ellipses()Constructs a Trigger instance around the ellipses button's digital signal.Constructs a Trigger instance around the ellipses button's digital signal.frame()Constructs a Trigger instance around the frame button's digital signal.Constructs a Trigger instance around the frame button's digital signal.getHID()Get the underlying GenericHID object.doublegetLeftX()Get the X axis value of left side of the controller.doublegetLeftY()Get the Y axis value of left side of the controller.doubleGet the X axis value of right side of the controller.doubleGet the Y axis value of right side of the controller.google()Constructs a Trigger instance around the google button's digital signal.Constructs a Trigger instance around the google button's digital signal.Constructs a Trigger instance around the hamburger button's digital signal.Constructs a Trigger instance around the hamburger button's digital signal.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 stick button's digital signal.Constructs a Trigger instance around the left stick button's digital signal.Constructs a Trigger instance around the left trigger button's digital signal.leftTrigger(EventLoop loop) Constructs a Trigger instance around the left trigger 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 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 trigger button's digital signal.rightTrigger(EventLoop loop) Constructs a Trigger instance around the right trigger button's digital signal.stadia()Constructs a Trigger instance around the stadia button's digital signal.Constructs a Trigger instance around the stadia 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.Methods inherited from class org.wpilib.commands3.button.CommandGenericHID
axisGreaterThan, axisGreaterThan, axisLessThan, axisLessThan, axisMagnitudeGreaterThan, axisMagnitudeGreaterThan, button, button, getRawAxis, getScheduler, isConnected, pov, pov, povCenter, povDown, povDownLeft, povDownRight, povLeft, povRight, povUp, povUpLeft, povUpRight, setRumble
-
Constructor Details
-
CommandStadiaController
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.
-
CommandStadiaController
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.
-
-
Method Details
-
getHID
Get the underlying GenericHID object.- Overrides:
getHIDin classCommandGenericHID- Returns:
- the wrapped GenericHID 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
Constructs a Trigger instance around the A button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the A button's digital signal attached to the given loop.
-
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
Constructs a Trigger instance around the B button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the B button's digital signal attached to the given loop.
-
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
Constructs a Trigger instance around the X button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the X button's digital signal attached to the given loop.
-
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
Constructs a Trigger instance around the Y button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the Y button's digital signal attached to the given loop.
-
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
Constructs a Trigger instance around the left bumper button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the left bumper button's digital signal attached to the given loop.
-
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
Constructs a Trigger instance around the right bumper button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the right bumper button's digital signal attached to the given loop.
-
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
Constructs a Trigger instance around the left stick button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the left stick button's digital signal attached to the given loop.
-
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
Constructs a Trigger instance around the right stick button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the right stick button's digital signal attached to the given loop.
-
ellipses
Constructs a Trigger instance around the ellipses button's digital signal.- Returns:
- a Trigger instance representing the ellipses 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:
-
ellipses
Constructs a Trigger instance around the ellipses button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the ellipses button's digital signal attached to the given loop.
-
hamburger
Constructs a Trigger instance around the hamburger button's digital signal.- Returns:
- a Trigger instance representing the hamburger 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:
-
hamburger
Constructs a Trigger instance around the hamburger button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the hamburger button's digital signal attached to the given loop.
-
stadia
Constructs a Trigger instance around the stadia button's digital signal.- Returns:
- a Trigger instance representing the stadia 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:
-
stadia
Constructs a Trigger instance around the stadia button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the stadia button's digital signal attached to the given loop.
-
rightTrigger
Constructs a Trigger instance around the right trigger button's digital signal.- Returns:
- a Trigger instance representing the right trigger 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:
-
rightTrigger
Constructs a Trigger instance around the right trigger button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the right trigger button's digital signal attached to the given loop.
-
leftTrigger
Constructs a Trigger instance around the left trigger button's digital signal.- Returns:
- a Trigger instance representing the left trigger 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:
-
leftTrigger
Constructs a Trigger instance around the left trigger button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the left trigger button's digital signal attached to the given loop.
-
google
Constructs a Trigger instance around the google button's digital signal.- Returns:
- a Trigger instance representing the google 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:
-
google
Constructs a Trigger instance around the google button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the google button's digital signal attached to the given loop.
-
frame
Constructs a Trigger instance around the frame button's digital signal.- Returns:
- a Trigger instance representing the frame 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:
-
frame
Constructs a Trigger instance around the frame button's digital signal.- Parameters:
loop- the event loop instance to attach the event to.- Returns:
- a Trigger instance representing the frame button's digital signal attached to the given loop.
-
getLeftX
Get the X axis value of left side of the controller. Right is positive.- Returns:
- The axis value.
-
getRightX
Get the X axis value of right side of the controller. Right is positive.- Returns:
- The axis value.
-
getLeftY
Get the Y axis value of left side of the controller. Back is positive.- Returns:
- The axis value.
-
getRightY
Get the Y axis value of right side of the controller. Back is positive.- Returns:
- The axis value.
-