430 static constexpr int kA = 1;
431 static constexpr int kB = 2;
432 static constexpr int kX = 3;
433 static constexpr int kY = 4;
This class provides an easy way to link actions to inputs.
Definition: BooleanEvent.h:31
The loop polling BooleanEvent objects and executing the actions bound to them.
Definition: EventLoop.h:15
Handle input from standard HID devices connected to the Driver Station.
Definition: GenericHID.h:24
Handle input from Xbox 360 or Xbox One controllers connected to the Driver Station.
Definition: XboxController.h:20
bool GetBButtonReleased()
Whether the B button was released since the last check.
BooleanEvent A(EventLoop *loop) const
Constructs an event instance around the A button's digital signal.
bool GetBackButtonPressed()
Whether the back button was pressed since the last check.
bool GetStartButtonPressed()
Whether the start button was pressed since the last check.
bool GetBButtonPressed()
Whether the B button was pressed since the last check.
double GetLeftX() const
Get the X axis value of left side of the controller.
bool GetAButton() const
Read the value of the A button on the controller.
bool GetLeftBumper() const
Read the value of the left bumper (LB) button on the controller.
bool GetLeftStickButton() const
Read the value of the left stick button (LSB) on the controller.
BooleanEvent Back(EventLoop *loop) const
Constructs an event instance around the back button's digital signal.
BooleanEvent LeftStick(EventLoop *loop) const
Constructs an event instance around the left stick's digital signal.
bool GetRightBumperReleased()
Whether the right bumper (RB) was released since the last check.
bool GetAButtonReleased()
Whether the A button was released since the last check.
BooleanEvent Start(EventLoop *loop) const
Constructs an event instance around the start button's digital signal.
bool GetBButton() const
Read the value of the B button on the controller.
XboxController(XboxController &&)=default
double GetLeftY() const
Get the Y axis value of left side of the controller.
bool GetXButtonPressed()
Whether the X button was pressed since the last check.
XboxController & operator=(XboxController &&)=default
BooleanEvent B(EventLoop *loop) const
Constructs an event instance around the B button's digital signal.
double GetLeftTriggerAxis() const
Get the left trigger (LT) axis value of the controller.
bool GetYButtonReleased()
Whether the Y button was released since the last check.
BooleanEvent RightBumper(EventLoop *loop) const
Constructs an event instance around the right bumper's digital signal.
BooleanEvent RightTrigger(EventLoop *loop) const
Constructs an event instance around the axis value of the right trigger.
bool GetLeftBumperPressed()
Whether the left bumper (LB) was pressed since the last check.
bool GetXButtonReleased()
Whether the X button was released since the last check.
bool GetRightBumper() const
Read the value of the right bumper (RB) button on the controller.
bool GetBackButtonReleased()
Whether the back button was released since the last check.
XboxController(int port)
Construct an instance of an Xbox controller.
bool GetLeftBumperReleased()
Whether the left bumper (LB) was released since the last check.
BooleanEvent RightTrigger(double threshold, EventLoop *loop) const
Constructs an event instance around the axis value of the right trigger.
~XboxController() override=default
bool GetRightStickButtonPressed()
Whether the right stick button (RSB) was pressed since the last check.
bool GetYButton() const
Read the value of the Y button on the controller.
BooleanEvent LeftTrigger(EventLoop *loop) const
Constructs an event instance around the axis value of the left trigger.
double GetRightY() const
Get the Y axis value of right side of the controller.
bool GetAButtonPressed()
Whether the A button was pressed since the last check.
BooleanEvent X(EventLoop *loop) const
Constructs an event instance around the X button's digital signal.
BooleanEvent RightStick(EventLoop *loop) const
Constructs an event instance around the right stick's digital signal.
bool GetLeftStickButtonPressed()
Whether the left stick button (LSB) was pressed since the last check.
bool GetRightStickButtonReleased()
Whether the right stick button (RSB) was released since the last check.
bool GetRightBumperPressed()
Whether the right bumper (RB) was pressed since the last check.
bool GetXButton() const
Read the value of the X button on the controller.
bool GetRightStickButton() const
Read the value of the right stick button (RSB) on the controller.
bool GetStartButtonReleased()
Whether the start button was released since the last check.
bool GetLeftStickButtonReleased()
Whether the left stick button (LSB) was released since the last check.
double GetRightTriggerAxis() const
Get the right trigger (RT) axis value of the controller.
BooleanEvent LeftBumper(EventLoop *loop) const
Constructs an event instance around the left bumper's digital signal.
bool GetBackButton() const
Read the value of the back button on the controller.
bool GetStartButton() const
Read the value of the start button on the controller.
BooleanEvent LeftTrigger(double threshold, EventLoop *loop) const
Constructs an event instance around the axis value of the left trigger.
bool GetYButtonPressed()
Whether the Y button was pressed since the last check.
BooleanEvent Y(EventLoop *loop) const
Constructs an event instance around the Y button's digital signal.
double GetRightX() const
Get the X axis value of right side of the controller.
Definition: AprilTagPoseEstimator.h:15
Definition: XboxController.h:438
static constexpr int kLeftTrigger
Definition: XboxController.h:443
static constexpr int kLeftY
Definition: XboxController.h:441
static constexpr int kLeftX
Definition: XboxController.h:439
static constexpr int kRightTrigger
Definition: XboxController.h:444
static constexpr int kRightY
Definition: XboxController.h:442
static constexpr int kRightX
Definition: XboxController.h:440