536 static constexpr int kL1 = 4;
538 static constexpr int kR1 = 5;
540 static constexpr int kL2 = 6;
542 static constexpr int kR2 = 7;
548 static constexpr int kL3 = 10;
550 static constexpr int kR3 = 11;
552 static constexpr int kPS = 12;
568 static constexpr int kL2 = 3;
570 static constexpr int kR2 = 4;
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 GetShareButtonReleased()
Whether the share button was released since the last check.
BooleanEvent L2(EventLoop *loop) const
Constructs an event instance around the left trigger 2 button's digital signal.
bool GetR1ButtonReleased()
Whether the right trigger 1 button was released since the last check.
BooleanEvent L1(EventLoop *loop) const
Constructs an event instance around the left trigger 1 button's digital signal.
bool GetR1ButtonPressed()
Whether the right trigger 1 button was pressed since the last check.
bool GetCircleButton() const
Read the value of the circle button on the controller.
bool GetTriangleButton() const
Read the value of the triangle button on the controller.
~NiDsPS4Controller() override=default
bool GetL1ButtonReleased()
Whether the left trigger 1 button was released since the last check.
bool GetR3Button() const
Read the value of the R3 (right stick) button on the controller.
void InitSendable(wpi::util::SendableBuilder &builder) override
Initializes this Sendable object.
bool GetTouchpadButtonReleased()
Whether the touchpad button was released since the last check.
bool GetSquareButtonPressed()
Whether the square button was pressed since the last check.
bool GetR2ButtonPressed()
Whether the right trigger 2 button was pressed since the last check.
bool GetL3Button() const
Read the value of the L3 (left stick) button on the controller.
bool GetTouchpadButton() const
Read the value of the touchpad button on the controller.
double GetRightX() const
Get the X axis value of right side of the controller.
bool GetTouchpadButtonPressed()
Whether the touchpad button was pressed since the last check.
BooleanEvent R1(EventLoop *loop) const
Constructs an event instance around the right trigger 1 button's digital signal.
bool GetShareButton() const
Read the value of the share button on the controller.
BooleanEvent L3(EventLoop *loop) const
Constructs an event instance around the L3 (left stick) button's digital signal.
BooleanEvent Cross(EventLoop *loop) const
Constructs an event instance around the cross button's digital signal.
bool GetCrossButtonPressed()
Whether the cross button was pressed since the last check.
bool GetL3ButtonReleased()
Whether the L3 (left stick) button was released since the last check.
double GetLeftX() const
Get the X axis value of left side of the controller.
bool GetTriangleButtonPressed()
Whether the triangle button was pressed since the last check.
bool GetL1Button() const
Read the value of the left trigger 1 button on the controller.
bool GetShareButtonPressed()
Whether the share button was pressed since the last check.
bool GetR1Button() const
Read the value of the right trigger 1 button on the controller.
BooleanEvent Square(EventLoop *loop) const
Constructs an event instance around the square button's digital signal.
bool GetR3ButtonReleased()
Whether the R3 (right stick) button was released since the last check.
NiDsPS4Controller(NiDsPS4Controller &&)=default
bool GetR2ButtonReleased()
Whether the right trigger 2 button was released since the last check.
bool GetTriangleButtonReleased()
Whether the triangle button was released since the last check.
bool GetCrossButtonReleased()
Whether the cross button was released since the last check.
bool GetCircleButtonPressed()
Whether the circle button was pressed since the last check.
NiDsPS4Controller & operator=(NiDsPS4Controller &&)=default
bool GetSquareButtonReleased()
Whether the square button was released since the last check.
BooleanEvent PS(EventLoop *loop) const
Constructs an event instance around the PlayStation button's digital signal.
bool GetL1ButtonPressed()
Whether the left trigger 1 button was pressed since the last check.
bool GetL2ButtonPressed()
Whether the left trigger 2 button was pressed since the last check.
BooleanEvent Options(EventLoop *loop) const
Constructs an event instance around the options button's digital signal.
double GetRightY() const
Get the Y axis value of right side of the controller.
BooleanEvent R2(EventLoop *loop) const
Constructs an event instance around the right trigger 2 button's digital signal.
bool GetCircleButtonReleased()
Whether the circle button was released since the last check.
BooleanEvent Triangle(EventLoop *loop) const
Constructs an event instance around the triangle button's digital signal.
bool GetPSButtonPressed()
Whether the PlayStation button was pressed since the last check.
bool GetOptionsButton() const
Read the value of the options button on the controller.
bool GetL2ButtonReleased()
Whether the left trigger 2 button was released since the last check.
bool GetOptionsButtonReleased()
Whether the options button was released since the last check.
bool GetR3ButtonPressed()
Whether the R3 (right stick) button was pressed since the last check.
bool GetPSButton() const
Read the value of the PlayStation button on the controller.
bool GetCrossButton() const
Read the value of the cross button on the controller.
bool GetPSButtonReleased()
Whether the PlayStation button was released since the last check.
double GetL2Axis() const
Get the left trigger 2 axis value of the controller.
bool GetL3ButtonPressed()
Whether the L3 (left stick) button was pressed since the last check.
BooleanEvent Touchpad(EventLoop *loop) const
Constructs an event instance around the touchpad button's digital signal.
NiDsPS4Controller(int port)
Construct an instance of a controller.
bool GetL2Button() const
Read the value of the left trigger 2 button on the controller.
bool GetSquareButton() const
Read the value of the square button on the controller.
BooleanEvent Share(EventLoop *loop) const
Constructs an event instance around the share button's digital signal.
double GetLeftY() const
Get the Y axis value of left side of the controller.
bool GetR2Button() const
Read the value of the right trigger 2 button on the controller.
double GetR2Axis() const
Get the right trigger 2 axis value of the controller.
BooleanEvent R3(EventLoop *loop) const
Constructs an event instance around the R3 (right stick) button's digital signal.
bool GetOptionsButtonPressed()
Whether the options button was pressed since the last check.
BooleanEvent Circle(EventLoop *loop) const
Constructs an event instance around the circle 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 NiDsPS4Controller.
Definition NiDsPS4Controller.hpp:558
static constexpr int kL2
Left trigger 2.
Definition NiDsPS4Controller.hpp:568
static constexpr int kR2
Right trigger 2.
Definition NiDsPS4Controller.hpp:570
static constexpr int kLeftY
Left Y axis.
Definition NiDsPS4Controller.hpp:562
static constexpr int kRightY
Right Y axis.
Definition NiDsPS4Controller.hpp:566
static constexpr int kRightX
Right X axis.
Definition NiDsPS4Controller.hpp:564
static constexpr int kLeftX
Left X axis.
Definition NiDsPS4Controller.hpp:560