1013 double GetAxisForSendable(
int axis)
const;
1014 bool GetButtonForSendable(
int button)
const;
This class provides an easy way to link actions to active high logic signals.
Definition BooleanEvent.hpp:28
A declarative way to bind a set of actions to a loop and execute them when the loop is polled.
Definition EventLoop.hpp:15
bool GetMisc5Button() const
Read the value of the Miscellaneous 5 button on the controller.
BooleanEvent RightBumper(EventLoop *loop) const
Constructs an event instance around the right bumper button's digital signal.
BooleanEvent RightPaddle1(EventLoop *loop) const
Constructs an event instance around the Right Paddle 1 button's digital signal.
Gamepad & operator=(Gamepad &&)=default
BooleanEvent RightStick(EventLoop *loop) const
Constructs an event instance around the right stick button's digital signal.
~Gamepad() override=default
BooleanEvent Guide(EventLoop *loop) const
Constructs an event instance around the Guide button's digital signal.
bool GetStartButtonReleased()
Whether the Start button was released since the last check.
bool GetMisc5ButtonPressed()
Whether the Miscellaneous 5 button was pressed since the last check.
bool GetSouthFaceButton() const
Read the value of the South Face button on the controller.
BooleanEvent Misc1(EventLoop *loop) const
Constructs an event instance around the Miscellaneous 1 button's digital signal.
BooleanEvent RightTrigger(double threshold, EventLoop *loop) const
Constructs an event instance around the axis value of the right trigger.
BooleanEvent Misc6(EventLoop *loop) const
Constructs an event instance around the Miscellaneous 6 button's digital signal.
bool GetDpadLeftButtonPressed()
Whether the D-pad left button was pressed since the last check.
bool GetDpadLeftButton() const
Read the value of the D-pad left button on the controller.
bool GetMisc4ButtonReleased()
Whether the Miscellaneous 4 button was released since the last check.
bool GetDpadDownButton() const
Read the value of the D-pad down button on the controller.
bool GetWestFaceButtonReleased()
Whether the West Face button was released since the last check.
bool GetDpadUpButtonPressed()
Whether the D-pad up button was pressed since the last check.
Gamepad(int port)
Construct an instance of a controller.
BooleanEvent LeftPaddle2(EventLoop *loop) const
Constructs an event instance around the Left Paddle 2 button's digital signal.
bool GetBackButton() const
Read the value of the Back button on the controller.
bool GetMisc2ButtonReleased()
Whether the Miscellaneous 2 button was released since the last check.
BooleanEvent NorthFace(EventLoop *loop) const
Constructs an event instance around the North Face button's digital signal.
bool GetMisc3Button() const
Read the value of the Miscellaneous 3 button on the controller.
bool GetBackButtonReleased()
Whether the Back button was released since the last check.
bool GetDpadRightButtonReleased()
Whether the D-pad right button was released since the last check.
bool GetRightStickButtonPressed()
Whether the right stick button was pressed since the last check.
BooleanEvent LeftPaddle1(EventLoop *loop) const
Constructs an event instance around the Left Paddle 1 button's digital signal.
bool GetRightPaddle2ButtonReleased()
Whether the Right Paddle 2 button was released since the last check.
bool GetSouthFaceButtonPressed()
Whether the South Face button was pressed since the last check.
bool GetRightPaddle1ButtonReleased()
Whether the Right Paddle 1 button was released since the last check.
double GetRightY() const
Get the Y axis value of right side of the controller.
BooleanEvent RightTrigger(EventLoop *loop) const
Constructs an event instance around the axis value of the right trigger.
double GetLeftTriggerAxis() const
Get the left trigger axis value of the controller.
BooleanEvent Misc4(EventLoop *loop) const
Constructs an event instance around the Miscellaneous 4 button's digital signal.
bool GetEastFaceButton() const
Read the value of the East Face button on the controller.
BooleanEvent Back(EventLoop *loop) const
Constructs an event instance around the Back button's digital signal.
bool GetMisc1ButtonReleased()
Whether the Miscellaneous 1 button was released since the last check.
double GetLeftY() const
Get the Y axis value of left side of the controller.
bool GetDpadDownButtonReleased()
Whether the D-pad down button was released since the last check.
bool GetRightPaddle2Button() const
Read the value of the Right Paddle 2 button on the controller.
bool GetLeftPaddle2ButtonReleased()
Whether the Left Paddle 2 button was released since the last check.
BooleanEvent EastFace(EventLoop *loop) const
Constructs an event instance around the East Face button's digital signal.
BooleanEvent LeftTrigger(double threshold, EventLoop *loop) const
Constructs an event instance around the axis value of the left trigger.
bool GetRightBumperButtonPressed()
Whether the right bumper button was pressed since the last check.
bool GetDpadLeftButtonReleased()
Whether the D-pad left button was released since the last check.
bool GetWestFaceButtonPressed()
Whether the West Face button was pressed since the last check.
BooleanEvent Misc3(EventLoop *loop) const
Constructs an event instance around the Miscellaneous 3 button's digital signal.
bool GetRightPaddle1Button() const
Read the value of the Right Paddle 1 button on the controller.
bool GetLeftBumperButtonPressed()
Whether the right bumper button was pressed since the last check.
bool GetGuideButton() const
Read the value of the Guide button on the controller.
bool GetMisc2ButtonPressed()
Whether the Miscellaneous 2 button was pressed since the last check.
bool GetDpadUpButton() const
Read the value of the D-pad up button on the controller.
bool GetTouchpadButtonReleased()
Whether the Touchpad button was released since the last check.
bool GetLeftPaddle1ButtonPressed()
Whether the Left Paddle 1 button was pressed since the last check.
bool GetLeftStickButton() const
Read the value of the left stick button on the controller.
bool GetLeftBumperButtonReleased()
Whether the right bumper button was released since the last check.
bool GetRightBumperButtonReleased()
Whether the right bumper button was released since the last check.
bool GetLeftStickButtonReleased()
Whether the left stick button was released since the last check.
bool GetSouthFaceButtonReleased()
Whether the South Face button was released since the last check.
BooleanEvent DpadRight(EventLoop *loop) const
Constructs an event instance around the D-pad right button's digital signal.
bool GetMisc6ButtonReleased()
Whether the Miscellaneous 6 button was released since the last check.
bool GetMisc3ButtonPressed()
Whether the Miscellaneous 3 button was pressed since the last check.
bool GetMisc6Button() const
Read the value of the Miscellaneous 6 button on the controller.
bool GetDpadUpButtonReleased()
Whether the D-pad up button was released since the last check.
bool GetDpadRightButton() const
Read the value of the D-pad right button on the controller.
bool GetGuideButtonReleased()
Whether the Guide button was released since the last check.
bool GetTouchpadButtonPressed()
Whether the Touchpad button was pressed since the last check.
void InitSendable(wpi::util::SendableBuilder &builder) override
Initializes this Sendable object.
bool GetMisc4Button() const
Read the value of the Miscellaneous 4 button on the controller.
Gamepad(Gamepad &&)=default
bool GetMisc2Button() const
Read the value of the Miscellaneous 2 button on the controller.
bool GetLeftPaddle2Button() const
Read the value of the Left Paddle 2 button on the controller.
bool GetDpadDownButtonPressed()
Whether the D-pad down button was pressed since the last check.
BooleanEvent WestFace(EventLoop *loop) const
Constructs an event instance around the West Face button's digital signal.
bool GetRightPaddle2ButtonPressed()
Whether the Right Paddle 2 button was pressed since the last check.
BooleanEvent Touchpad(EventLoop *loop) const
Constructs an event instance around the Touchpad button's digital signal.
bool GetMisc6ButtonPressed()
Whether the Miscellaneous 6 button was pressed since the last check.
bool GetLeftBumperButton() const
Read the value of the right bumper button on the controller.
BooleanEvent LeftStick(EventLoop *loop) const
Constructs an event instance around the left stick button's digital signal.
bool GetMisc1Button() const
Read the value of the Miscellaneous 1 button on the controller.
BooleanEvent SouthFace(EventLoop *loop) const
Constructs an event instance around the South Face button's digital signal.
bool GetTouchpadButton() const
Read the value of the Touchpad button on the controller.
bool GetLeftPaddle2ButtonPressed()
Whether the Left Paddle 2 button was pressed since the last check.
bool GetDpadRightButtonPressed()
Whether the D-pad right button was pressed since the last check.
BooleanEvent DpadLeft(EventLoop *loop) const
Constructs an event instance around the D-pad left button's digital signal.
bool GetRightPaddle1ButtonPressed()
Whether the Right Paddle 1 button was pressed since the last check.
bool GetMisc3ButtonReleased()
Whether the Miscellaneous 3 button was released since the last check.
bool GetRightBumperButton() const
Read the value of the right bumper button on the controller.
bool GetRightStickButton() const
Read the value of the right stick button on the controller.
bool GetEastFaceButtonPressed()
Whether the East Face button was pressed since the last check.
bool GetLeftPaddle1Button() const
Read the value of the Left Paddle 1 button on the controller.
bool GetBackButtonPressed()
Whether the Back button was pressed since the last check.
BooleanEvent DpadDown(EventLoop *loop) const
Constructs an event instance around the D-pad down button's digital signal.
bool GetLeftPaddle1ButtonReleased()
Whether the Left Paddle 1 button was released since the last check.
BooleanEvent Misc5(EventLoop *loop) const
Constructs an event instance around the Miscellaneous 5 button's digital signal.
BooleanEvent LeftTrigger(EventLoop *loop) const
Constructs an event instance around the axis value of the left trigger.
double GetLeftX() const
Get the X axis value of left side of the controller.
double GetRightTriggerAxis() const
Get the right trigger axis value of the controller.
BooleanEvent DpadUp(EventLoop *loop) const
Constructs an event instance around the D-pad up button's digital signal.
bool GetMisc1ButtonPressed()
Whether the Miscellaneous 1 button was pressed since the last check.
BooleanEvent LeftBumper(EventLoop *loop) const
Constructs an event instance around the right bumper button's digital signal.
double GetRightX() const
Get the X axis value of right side of the controller.
bool GetNorthFaceButton() const
Read the value of the North Face button on the controller.
bool GetEastFaceButtonReleased()
Whether the East Face button was released since the last check.
bool GetWestFaceButton() const
Read the value of the West Face button on the controller.
bool GetNorthFaceButtonReleased()
Whether the North Face button was released since the last check.
BooleanEvent RightPaddle2(EventLoop *loop) const
Constructs an event instance around the Right Paddle 2 button's digital signal.
BooleanEvent Misc2(EventLoop *loop) const
Constructs an event instance around the Miscellaneous 2 button's digital signal.
bool GetGuideButtonPressed()
Whether the Guide button was pressed since the last check.
bool GetMisc4ButtonPressed()
Whether the Miscellaneous 4 button was pressed since the last check.
bool GetMisc5ButtonReleased()
Whether the Miscellaneous 5 button was released since the last check.
bool GetLeftStickButtonPressed()
Whether the left stick button was pressed since the last check.
bool GetStartButtonPressed()
Whether the Start button was pressed since the last check.
bool GetRightStickButtonReleased()
Whether the right stick button was released since the last check.
bool GetNorthFaceButtonPressed()
Whether the North Face button was pressed since the last check.
bool GetStartButton() const
Read the value of the Start button on the controller.
BooleanEvent Start(EventLoop *loop) const
Constructs an event instance around the Start button's digital signal.
Helper class for building Sendable dashboard representations.
Definition SendableBuilder.hpp:21
A helper class for use with objects that add themselves to SendableRegistry.
Definition SendableHelper.hpp:21
Interface for Sendable objects.
Definition Sendable.hpp:16
Definition CvSource.hpp:15
Represents an axis on an Gamepad.
Definition Gamepad.hpp:995
static constexpr int kLeftX
Left X axis.
Definition Gamepad.hpp:997
static constexpr int kRightX
Right X axis.
Definition Gamepad.hpp:1001
static constexpr int kRightTrigger
Right trigger.
Definition Gamepad.hpp:1007
static constexpr int kLeftY
Left Y axis.
Definition Gamepad.hpp:999
static constexpr int kRightY
Right Y axis.
Definition Gamepad.hpp:1003
static constexpr int kLeftTrigger
Left trigger.
Definition Gamepad.hpp:1005