519 static constexpr int kL1 = 5;
521 static constexpr int kR1 = 6;
523 static constexpr int kL2 = 7;
525 static constexpr int kR2 = 8;
531 static constexpr int kL3 = 11;
533 static constexpr int kR3 = 12;
535 static constexpr int kPS = 13;
553 static constexpr int kL2 = 3;
555 static constexpr int kR2 = 4;
This class provides an easy way to link actions to inputs.
Definition: BooleanEvent.h:31
A declarative way to bind a set of actions to a loop and execute them when the loop is polled.
Definition: EventLoop.h:15
Handle input from standard HID devices connected to the Driver Station.
Definition: GenericHID.h:24
Handle input from PS5 controllers connected to the Driver Station.
Definition: PS5Controller.h:23
bool GetOptionsButtonReleased()
Whether the Options button was released since the last check.
bool GetSquareButtonPressed()
Whether the Square button was pressed since the last check.
BooleanEvent PS(EventLoop *loop) const
Constructs an event instance around the PS button's digital signal.
bool GetL3ButtonPressed()
Whether the L3 (left stick) button was pressed since the last check.
bool GetCrossButtonPressed()
Whether the Cross button was pressed since the last check.
bool GetSquareButtonReleased()
Whether the Square button was released since the last check.
bool GetCircleButtonReleased()
Whether the Circle button was released since the last check.
bool GetCircleButtonPressed()
Whether the Circle button was pressed since the last check.
bool GetL3ButtonReleased()
Whether the L3 (left stick) button was released since the last check.
~PS5Controller() override=default
bool GetPSButtonReleased()
Whether the PS button was released since the last check.
BooleanEvent R2(EventLoop *loop) const
Constructs an event instance around the R2 button's digital signal.
BooleanEvent R1(EventLoop *loop) const
Constructs an event instance around the R1 button's digital signal.
bool GetL1ButtonReleased()
Whether the L1 button was released since the last check.
bool GetR1ButtonReleased()
Whether the R1 button was released since the last check.
BooleanEvent L2(EventLoop *loop) const
Constructs an event instance around the L2 button's digital signal.
PS5Controller & operator=(PS5Controller &&)=default
bool GetCircleButton() const
Read the value of the Circle button on the controller.
bool GetPSButtonPressed()
Whether the PS button was pressed since the last check.
BooleanEvent Touchpad(EventLoop *loop) const
Constructs an event instance around the touchpad's digital signal.
bool GetPSButton() const
Read the value of the PS button on the controller.
PS5Controller(PS5Controller &&)=default
BooleanEvent L1(EventLoop *loop) const
Constructs an event instance around the L1 button's digital signal.
double GetLeftY() const
Get the Y axis value of left side of the controller.
bool GetSquareButton() const
Read the value of the Square button on the controller.
bool GetR3ButtonReleased()
Whether the R3 (right stick) button was released since the last check.
bool GetL2ButtonReleased()
Whether the L2 button was released since the last check.
double GetR2Axis() const
Get the R2 axis value of the controller.
double GetRightY() const
Get the Y axis value of right side of the controller.
bool GetR3Button() const
Read the value of the R3 button (pressing the right analog stick) on the controller.
bool GetL2Button() const
Read the value of the L2 button on the controller.
BooleanEvent Circle(EventLoop *loop) const
Constructs an event instance around the circle button's digital signal.
BooleanEvent Square(EventLoop *loop) const
Constructs an event instance around the square button's digital signal.
double GetLeftX() const
Get the X axis value of left side of the controller.
bool GetR2Button() const
Read the value of the R2 button on the controller.
bool GetOptionsButton() const
Read the value of the Options button on the controller.
BooleanEvent Create(EventLoop *loop) const
Constructs an event instance around the Create button's digital signal.
bool GetTouchpad() const
Read the value of the touchpad button on the controller.
BooleanEvent R3(EventLoop *loop) const
Constructs an event instance around the R3 button's digital signal.
bool GetL3Button() const
Read the value of the L3 button (pressing the left analog stick) on the controller.
bool GetTriangleButton() const
Read the value of the Triangle button on the controller.
bool GetR2ButtonReleased()
Whether the R2 button was released since the last check.
bool GetL1Button() const
Read the value of the L1 button on the controller.
bool GetR2ButtonPressed()
Whether the R2 button was pressed since the last check.
bool GetTouchpadReleased()
Whether the touchpad was released since the last check.
bool GetOptionsButtonPressed()
Whether the Options button was pressed since the last check.
bool GetTouchpadPressed()
Whether the touchpad was pressed since the last check.
double GetRightX() const
Get the X axis value of right side of the controller.
PS5Controller(int port)
Construct an instance of an PS5 controller.
BooleanEvent Cross(EventLoop *loop) const
Constructs an event instance around the cross button's digital signal.
bool GetL2ButtonPressed()
Whether the L2 button was pressed since the last check.
bool GetCrossButtonReleased()
Whether the Cross button was released since the last check.
bool GetCreateButton() const
Read the value of the Create button on the controller.
bool GetL1ButtonPressed()
Whether the L1 button was pressed since the last check.
bool GetCreateButtonPressed()
Whether the Create button was pressed since the last check.
double GetL2Axis() const
Get the L2 axis value of the controller.
bool GetCreateButtonReleased()
Whether the Create button was released since the last check.
bool GetTriangleButtonPressed()
Whether the Triangle button was pressed since the last check.
bool GetR3ButtonPressed()
Whether the R3 (right stick) button was pressed since the last check.
bool GetTriangleButtonReleased()
Whether the Triangle button was released since the last check.
bool GetR1ButtonPressed()
Whether the R1 button was pressed since the last check.
bool GetR1Button() const
Read the value of the R1 button on the controller.
bool GetCrossButton() const
Read the value of the Cross button on the controller.
BooleanEvent Triangle(EventLoop *loop) const
Constructs an event instance around the triangle button's digital signal.
BooleanEvent L3(EventLoop *loop) const
Constructs an event instance around the L3 button's digital signal.
BooleanEvent Options(EventLoop *loop) const
Constructs an event instance around the options button's digital signal.
Definition: AprilTagPoseEstimator.h:15
Represents an axis on a PS5Controller.
Definition: PS5Controller.h:543
static constexpr int kRightY
Right Y axis.
Definition: PS5Controller.h:551
static constexpr int kLeftY
Left Y axis.
Definition: PS5Controller.h:547
static constexpr int kL2
Left Trigger 2.
Definition: PS5Controller.h:553
static constexpr int kLeftX
Left X axis.
Definition: PS5Controller.h:545
static constexpr int kRightX
Right X axis.
Definition: PS5Controller.h:549
static constexpr int kR2
Right Trigger 2.
Definition: PS5Controller.h:555