Class CommandStadiaController
java.lang.Object
edu.wpi.first.wpilibj2.command.button.CommandGenericHID
edu.wpi.first.wpilibj2.command.button.CommandStadiaController
public class CommandStadiaController extends CommandGenericHID
A version of
StadiaController
with Trigger
factories for command-based.- See Also:
StadiaController
-
Constructor Summary
Constructors Constructor Description CommandStadiaController(int port)
Construct an instance of a controller. -
Method Summary
Modifier and Type Method Description Trigger
a()
Constructs an event instance around the A button's digital signal.Trigger
a(EventLoop loop)
Constructs an event instance around the A button's digital signal.Trigger
b()
Constructs an event instance around the B button's digital signal.Trigger
b(EventLoop loop)
Constructs an event instance around the B button's digital signal.Trigger
ellipses()
Constructs an event instance around the ellipses button's digital signal.Trigger
ellipses(EventLoop loop)
Constructs an event instance around the ellipses button's digital signal.Trigger
frame()
Constructs an event instance around the frame button's digital signal.Trigger
frame(EventLoop loop)
Constructs an event instance around the frame button's digital signal.StadiaController
getHID()
Get the underlying GenericHID object.double
getLeftX()
Get the X axis value of left side of the controller.double
getLeftY()
Get the Y axis value of left side of the controller.double
getRightX()
Get the X axis value of right side of the controller.double
getRightY()
Get the Y axis value of right side of the controller.Trigger
google()
Constructs an event instance around the google button's digital signal.Trigger
google(EventLoop loop)
Constructs an event instance around the google button's digital signal.Trigger
hamburger()
Constructs an event instance around the hamburger button's digital signal.Trigger
hamburger(EventLoop loop)
Constructs an event instance around the hamburger button's digital signal.Trigger
leftBumper()
Constructs an event instance around the left bumper's digital signal.Trigger
leftBumper(EventLoop loop)
Constructs an event instance around the left bumper's digital signal.Trigger
leftStick()
Constructs an event instance around the left stick button's digital signal.Trigger
leftStick(EventLoop loop)
Constructs an event instance around the left stick button's digital signal.Trigger
leftTrigger()
Constructs an event instance around the left trigger button's digital signal.Trigger
leftTrigger(EventLoop loop)
Constructs an event instance around the left trigger button's digital signal.Trigger
rightBumper()
Constructs an event instance around the right bumper's digital signal.Trigger
rightBumper(EventLoop loop)
Constructs an event instance around the right bumper's digital signal.Trigger
rightStick()
Constructs an event instance around the right stick button's digital signal.Trigger
rightStick(EventLoop loop)
Constructs an event instance around the right stick button's digital signal.Trigger
rightTrigger()
Constructs an event instance around the right trigger button's digital signal.Trigger
rightTrigger(EventLoop loop)
Constructs an event instance around the right trigger button's digital signal.Trigger
stadia()
Constructs an event instance around the stadia button's digital signal.Trigger
stadia(EventLoop loop)
Constructs an event instance around the stadia button's digital signal.Trigger
x()
Constructs an event instance around the X button's digital signal.Trigger
x(EventLoop loop)
Constructs an event instance around the X button's digital signal.Trigger
y()
Constructs an event instance around the Y button's digital signal.Trigger
y(EventLoop loop)
Constructs an event instance around the Y button's digital signal.Methods inherited from class edu.wpi.first.wpilibj2.command.button.CommandGenericHID
axisGreaterThan, axisGreaterThan, axisLessThan, axisLessThan, button, button, getRawAxis, pov, pov, povCenter, povDown, povDownLeft, povDownRight, povLeft, povRight, povUp, povUpLeft, povUpRight
-
Constructor Details
-
CommandStadiaController
Construct an instance of a controller.- Parameters:
port
- The port index on the Driver Station that the controller is plugged into.
-
-
Method Details
-
getHID
Get the underlying GenericHID object.- Overrides:
getHID
in classCommandGenericHID
- Returns:
- the wrapped GenericHID object
-
leftBumper
Constructs an event instance around the left bumper's digital signal.- Returns:
- an event instance representing the left bumper's digital signal attached to the
default scheduler button loop
. - See Also:
leftBumper(EventLoop)
-
leftBumper
Constructs an event instance around the left bumper's digital signal.- Parameters:
loop
- the event loop instance to attach the event to.- Returns:
- an event instance representing the right bumper's digital signal attached to the given loop.
-
rightBumper
Constructs an event instance around the right bumper's digital signal.- Returns:
- an event instance representing the right bumper's digital signal attached to the
default scheduler button loop
. - See Also:
rightBumper(EventLoop)
-
rightBumper
Constructs an event instance around the right bumper's digital signal.- Parameters:
loop
- the event loop instance to attach the event to.- Returns:
- an event instance representing the left bumper's digital signal attached to the given loop.
-
leftStick
Constructs an event instance around the left stick button's digital signal.- Returns:
- an event instance representing the left stick button's digital signal attached to the
default scheduler button loop
. - See Also:
leftStick(EventLoop)
-
leftStick
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.
-
rightStick
Constructs an event instance around the right stick button's digital signal.- Returns:
- an event instance representing the right stick button's digital signal attached to the
default scheduler button loop
. - See Also:
rightStick(EventLoop)
-
rightStick
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
Constructs an event instance around the right trigger button's digital signal.- Returns:
- an event instance representing the right trigger button's digital signal attached to
the
default scheduler button loop
. - See Also:
rightTrigger(EventLoop)
-
rightTrigger
Constructs an event instance around the right trigger button's digital signal.- Parameters:
loop
- the event loop instance to attach the event to.- Returns:
- an event instance representing the right trigger button's digital signal attached to the given loop.
-
leftTrigger
Constructs an event instance around the left trigger button's digital signal.- Returns:
- an event instance representing the left trigger button's digital signal attached to the
default scheduler button loop
. - See Also:
leftTrigger(EventLoop)
-
leftTrigger
Constructs an event instance around the left trigger button's digital signal.- Parameters:
loop
- the event loop instance to attach the event to.- Returns:
- an event instance representing the left trigger button's digital signal attached to the given loop.
-
a
Constructs an event instance around the A button's digital signal.- Returns:
- an event instance representing the A button's digital signal attached to the
default scheduler button loop
. - See Also:
a(EventLoop)
-
a
Constructs an event instance around the A button's digital signal.- Parameters:
loop
- the event loop instance to attach the event to.- Returns:
- an event instance representing the A button's digital signal attached to the given loop.
-
b
Constructs an event instance around the B button's digital signal.- Returns:
- an event instance representing the B button's digital signal attached to the
default scheduler button loop
. - See Also:
b(EventLoop)
-
b
Constructs an event instance around the B button's digital signal.- Parameters:
loop
- the event loop instance to attach the event to.- Returns:
- an event instance representing the B button's digital signal attached to the given loop.
-
x
Constructs an event instance around the X button's digital signal.- Returns:
- an event instance representing the X button's digital signal attached to the
default scheduler button loop
. - See Also:
x(EventLoop)
-
x
Constructs an event instance around the X button's digital signal.- Parameters:
loop
- the event loop instance to attach the event to.- Returns:
- an event instance representing the X button's digital signal attached to the given loop.
-
y
Constructs an event instance around the Y button's digital signal.- Returns:
- an event instance representing the Y button's digital signal attached to the
default scheduler button loop
. - See Also:
y(EventLoop)
-
y
Constructs an event instance around the Y button's digital signal.- Parameters:
loop
- the event loop instance to attach the event to.- Returns:
- an event instance representing the Y button's digital signal attached to the given loop.
-
ellipses
Constructs an event instance around the ellipses button's digital signal.- Returns:
- an event instance representing the ellipses button's digital signal attached to the
default scheduler button loop
. - See Also:
ellipses(EventLoop)
-
ellipses
Constructs an event instance around the ellipses button's digital signal.- Parameters:
loop
- the event loop instance to attach the event to.- Returns:
- an event instance representing the ellipses button's digital signal attached to the given loop.
-
stadia
Constructs an event instance around the stadia button's digital signal.- Returns:
- an event instance representing the stadia button's digital signal attached to the
default scheduler button loop
. - See Also:
stadia(EventLoop)
-
stadia
Constructs an event instance around the stadia button's digital signal.- Parameters:
loop
- the event loop instance to attach the event to.- Returns:
- an event instance representing the stadia button's digital signal attached to the given loop.
-
google
Constructs an event instance around the google button's digital signal.- Returns:
- an event instance representing the google button's digital signal attached to the
default scheduler button loop
. - See Also:
google(EventLoop)
-
google
Constructs an event instance around the google button's digital signal.- Parameters:
loop
- the event loop instance to attach the event to.- Returns:
- an event instance representing the google button's digital signal attached to the given loop.
-
frame
Constructs an event instance around the frame button's digital signal.- Returns:
- an event instance representing the frame button's digital signal attached to the
default scheduler button loop
. - See Also:
frame(EventLoop)
-
frame
Constructs an event instance around the frame button's digital signal.- Parameters:
loop
- the event loop instance to attach the event to.- Returns:
- an event instance representing the frame button's digital signal attached to the given loop.
-
hamburger
Constructs an event instance around the hamburger button's digital signal.- Returns:
- an event instance representing the hamburger button's digital signal attached to the
default scheduler button loop
. - See Also:
hamburger(EventLoop)
-
hamburger
Constructs an event instance around the hamburger button's digital signal.- Parameters:
loop
- the event loop instance to attach the event to.- Returns:
- an event instance representing the hamburger button's digital signal attached to the given loop.
-
getLeftX
Get the X axis value of left side of the controller.- Returns:
- The axis value.
-
getRightX
Get the X axis value of right side of the controller.- Returns:
- The axis value.
-
getLeftY
Get the Y axis value of left side of the controller.- Returns:
- The axis value.
-
getRightY
Get the Y axis value of right side of the controller.- Returns:
- The axis value.
-