WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::NiDsPS5Controller Class Reference

Handle input from NiDsPS5 controllers connected to the Driver Station. More...

#include <wpi/driverstation/NiDsPS5Controller.hpp>

Inheritance diagram for wpi::NiDsPS5Controller:
wpi::GenericHID wpi::util::Sendable wpi::util::SendableHelper< NiDsPS5Controller >

Classes

struct  Button
 Represents a digital button on an NiDsPS5Controller. More...
struct  Axis
 Represents an axis on an NiDsPS5Controller. More...

Public Member Functions

 NiDsPS5Controller (int port)
 Construct an instance of a controller.
 ~NiDsPS5Controller () override=default
 NiDsPS5Controller (NiDsPS5Controller &&)=default
NiDsPS5Controlleroperator= (NiDsPS5Controller &&)=default
double GetLeftX () const
 Get the X axis value of left side of the controller.
double GetLeftY () const
 Get the Y axis value of left side of the controller.
double GetRightX () const
 Get the X axis value of right side of the controller.
double GetRightY () const
 Get the Y axis value of right side of the controller.
double GetL2Axis () const
 Get the left trigger 2 axis value of the controller.
double GetR2Axis () const
 Get the right trigger 2 axis value of the controller.
bool GetSquareButton () const
 Read the value of the square button on the controller.
bool GetSquareButtonPressed ()
 Whether the square button was pressed since the last check.
bool GetSquareButtonReleased ()
 Whether the square button was released since the last check.
BooleanEvent Square (EventLoop *loop) const
 Constructs an event instance around the square button's digital signal.
bool GetCrossButton () const
 Read the value of the cross button on the controller.
bool GetCrossButtonPressed ()
 Whether the cross button was pressed since the last check.
bool GetCrossButtonReleased ()
 Whether the cross button was released since the last check.
BooleanEvent Cross (EventLoop *loop) const
 Constructs an event instance around the cross button's digital signal.
bool GetCircleButton () const
 Read the value of the circle button on the controller.
bool GetCircleButtonPressed ()
 Whether the circle button was pressed since the last check.
bool GetCircleButtonReleased ()
 Whether the circle button was released since the last check.
BooleanEvent Circle (EventLoop *loop) const
 Constructs an event instance around the circle button's digital signal.
bool GetTriangleButton () const
 Read the value of the triangle button on the controller.
bool GetTriangleButtonPressed ()
 Whether the triangle button was pressed since the last check.
bool GetTriangleButtonReleased ()
 Whether the triangle button was released since the last check.
BooleanEvent Triangle (EventLoop *loop) const
 Constructs an event instance around the triangle button's digital signal.
bool GetL1Button () const
 Read the value of the left trigger 1 button on the controller.
bool GetL1ButtonPressed ()
 Whether the left trigger 1 button was pressed since the last check.
bool GetL1ButtonReleased ()
 Whether the left 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 GetR1Button () const
 Read the value of the right trigger 1 button on the controller.
bool GetR1ButtonPressed ()
 Whether the right trigger 1 button was pressed since the last check.
bool GetR1ButtonReleased ()
 Whether the right trigger 1 button was released since the last check.
BooleanEvent R1 (EventLoop *loop) const
 Constructs an event instance around the right trigger 1 button's digital signal.
bool GetL2Button () const
 Read the value of the left trigger 2 button on the controller.
bool GetL2ButtonPressed ()
 Whether the left trigger 2 button was pressed since the last check.
bool GetL2ButtonReleased ()
 Whether the left trigger 2 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 GetR2Button () const
 Read the value of the right trigger 2 button on the controller.
bool GetR2ButtonPressed ()
 Whether the right trigger 2 button was pressed since the last check.
bool GetR2ButtonReleased ()
 Whether the right trigger 2 button was released since the last check.
BooleanEvent R2 (EventLoop *loop) const
 Constructs an event instance around the right trigger 2 button's digital signal.
bool GetCreateButton () const
 Read the value of the create button on the controller.
bool GetCreateButtonPressed ()
 Whether the create button was pressed since the last check.
bool GetCreateButtonReleased ()
 Whether the create button was released since the last check.
BooleanEvent Create (EventLoop *loop) const
 Constructs an event instance around the create button's digital signal.
bool GetOptionsButton () const
 Read the value of the options button on the controller.
bool GetOptionsButtonPressed ()
 Whether the options button was pressed since the last check.
bool GetOptionsButtonReleased ()
 Whether the options button was released since the last check.
BooleanEvent Options (EventLoop *loop) const
 Constructs an event instance around the options button's digital signal.
bool GetL3Button () const
 Read the value of the L3 (left stick) button on the controller.
bool GetL3ButtonPressed ()
 Whether the L3 (left stick) button was pressed since the last check.
bool GetL3ButtonReleased ()
 Whether the L3 (left stick) button was released since the last check.
BooleanEvent L3 (EventLoop *loop) const
 Constructs an event instance around the L3 (left stick) button's digital signal.
bool GetR3Button () const
 Read the value of the R3 (right stick) button on the controller.
bool GetR3ButtonPressed ()
 Whether the R3 (right stick) button was pressed since the last check.
bool GetR3ButtonReleased ()
 Whether the R3 (right stick) button was released since the last check.
BooleanEvent R3 (EventLoop *loop) const
 Constructs an event instance around the R3 (right stick) button's digital signal.
bool GetPSButton () const
 Read the value of the PlayStation button on the controller.
bool GetPSButtonPressed ()
 Whether the PlayStation button was pressed since the last check.
bool GetPSButtonReleased ()
 Whether the PlayStation button was released since the last check.
BooleanEvent PS (EventLoop *loop) const
 Constructs an event instance around the PlayStation button's digital signal.
bool GetTouchpadButton () const
 Read the value of the touchpad button on the controller.
bool GetTouchpadButtonPressed ()
 Whether the touchpad button was pressed since the last check.
bool GetTouchpadButtonReleased ()
 Whether the touchpad button was released since the last check.
BooleanEvent Touchpad (EventLoop *loop) const
 Constructs an event instance around the touchpad button's digital signal.
void InitSendable (wpi::util::SendableBuilder &builder) override
 Initializes this Sendable object.
Public Member Functions inherited from wpi::GenericHID
 GenericHID (int port)
virtual ~GenericHID ()=default
 GenericHID (GenericHID &&)=default
GenericHIDoperator= (GenericHID &&)=default
bool GetRawButton (int button) const
 Get the button value (starting at button 1).
bool GetRawButtonPressed (int button)
 Whether the button was pressed since the last check.
bool GetRawButtonReleased (int button)
 Whether the button was released since the last check.
BooleanEvent Button (int button, EventLoop *loop) const
 Constructs an event instance around this button's digital signal.
double GetRawAxis (int axis) const
 Get the value of the axis.
DriverStation::POVDirection GetPOV (int pov=0) const
 Get the angle of a POV on the HID.
BooleanEvent POV (DriverStation::POVDirection angle, EventLoop *loop) const
 Constructs a BooleanEvent instance based around this angle of a POV on the HID.
BooleanEvent POV (int pov, DriverStation::POVDirection angle, EventLoop *loop) const
 Constructs a BooleanEvent instance based around this angle of a POV on the HID.
BooleanEvent POVUp (EventLoop *loop) const
 Constructs a BooleanEvent instance based around the up direction of the default (index 0) POV on the HID.
BooleanEvent POVUpRight (EventLoop *loop) const
 Constructs a BooleanEvent instance based around the up right direction of the default (index 0) POV on the HID.
BooleanEvent POVRight (EventLoop *loop) const
 Constructs a BooleanEvent instance based around the right direction of the default (index 0) POV on the HID.
BooleanEvent POVDownRight (EventLoop *loop) const
 Constructs a BooleanEvent instance based around the down right direction of the default (index 0) POV on the HID.
BooleanEvent POVDown (EventLoop *loop) const
 Constructs a BooleanEvent instance based around the down direction of the default (index 0) POV on the HID.
BooleanEvent POVDownLeft (EventLoop *loop) const
 Constructs a BooleanEvent instance based around the down left direction of the default (index 0) POV on the HID.
BooleanEvent POVLeft (EventLoop *loop) const
 Constructs a BooleanEvent instance based around the left direction of the default (index 0) POV on the HID.
BooleanEvent POVUpLeft (EventLoop *loop) const
 Constructs a BooleanEvent instance based around the up left direction of the default (index 0) POV on the HID.
BooleanEvent POVCenter (EventLoop *loop) const
 Constructs a BooleanEvent instance based around the center (not pressed) of the default (index 0) POV on the HID.
BooleanEvent AxisLessThan (int axis, double threshold, EventLoop *loop) const
 Constructs an event instance that is true when the axis value is less than threshold.
BooleanEvent AxisGreaterThan (int axis, double threshold, EventLoop *loop) const
 Constructs an event instance that is true when the axis value is greater than threshold.
int GetAxesMaximumIndex () const
int GetAxesAvailable () const
 Get the number of axes for the HID.
int GetPOVsMaximumIndex () const
int GetPOVsAvailable () const
 Get the number of POVs for the HID.
int GetButtonsMaximumIndex () const
uint64_t GetButtonsAvailable () const
 Get the number of buttons for the HID.
bool IsConnected () const
 Get if the HID is connected.
GenericHID::HIDType GetGamepadType () const
 Get the type of the HID.
GenericHID::SupportedOutputs GetSupportedOutputs () const
 Get the supported outputs of the HID.
std::string GetName () const
 Get the name of the HID.
int GetPort () const
 Get the port number of the HID.
void SetLeds (int r, int g, int b)
 Set leds on the controller.
void SetRumble (RumbleType type, double value)
 Set the rumble output for the HID.
bool GetTouchpadFingerAvailable (int touchpad, int finger) const
 Check if a touchpad finger is available.
DriverStation::TouchpadFinger GetTouchpadFinger (int touchpad, int finger) const
 Get the touchpad finger data.
Public Member Functions inherited from wpi::util::Sendable
virtual constexpr ~Sendable ()=default
Public Member Functions inherited from wpi::util::SendableHelper< NiDsPS5Controller >
constexpr SendableHelper (const SendableHelper &rhs)=default
constexpr SendableHelperoperator= (const SendableHelper &rhs)=default

Additional Inherited Members

Public Types inherited from wpi::GenericHID
enum  RumbleType { kLeftRumble , kRightRumble , kLeftTriggerRumble , kRightTriggerRumble }
 Represents a rumble output on the Joystick. More...
enum  SupportedOutputs {
  kNone = 0x0 , kMonoLed = 0x1 , kRgbLed = 0x2 , kPlayerLed = 0x4 ,
  kRumble = 0x8 , kTriggerRumble = 0x10
}
 Represents the various outputs that a HID may support. More...
enum  HIDType {
  kUnknown = 0 , kStandard , kXbox360 , kXboxOne ,
  kPS3 , kPS4 , kPS5 , kSwitchPro ,
  kSwitchJoyconLeft , kSwitchJoyconRight , kSwitchJoyconPair
}
 USB HID interface type. More...
Protected Member Functions inherited from wpi::util::SendableHelper< NiDsPS5Controller >
constexpr ~SendableHelper ()

Detailed Description

Handle input from NiDsPS5 controllers connected to the Driver Station.

This class handles NiDsPS5 input that comes from the Driver Station. Each time a value is requested the most recent value is returned. There is a single class instance for each controller and the mapping of ports to hardware buttons depends on the code in the Driver Station.

Only first party controllers from Sony are guaranteed to have the correct mapping, and only through the official NI DS. Sim is not guaranteed to have the same mapping, as well as any 3rd party controllers.

Constructor & Destructor Documentation

◆ NiDsPS5Controller() [1/2]

wpi::NiDsPS5Controller::NiDsPS5Controller ( int port)
explicit

Construct an instance of a controller.

The controller index is the USB port on the Driver Station.

Parameters
portThe port on the Driver Station that the controller is plugged into (0-5).

◆ ~NiDsPS5Controller()

wpi::NiDsPS5Controller::~NiDsPS5Controller ( )
overridedefault

◆ NiDsPS5Controller() [2/2]

wpi::NiDsPS5Controller::NiDsPS5Controller ( NiDsPS5Controller && )
default

Member Function Documentation

◆ Circle()

BooleanEvent wpi::NiDsPS5Controller::Circle ( EventLoop * loop) const

Constructs an event instance around the circle button's digital signal.

Parameters
loopthe event loop instance to attach the event to.
Returns
an event instance representing the circle button's digital signal attached to the given loop.

◆ Create()

BooleanEvent wpi::NiDsPS5Controller::Create ( EventLoop * loop) const

Constructs an event instance around the create button's digital signal.

Parameters
loopthe event loop instance to attach the event to.
Returns
an event instance representing the create button's digital signal attached to the given loop.

◆ Cross()

BooleanEvent wpi::NiDsPS5Controller::Cross ( EventLoop * loop) const

Constructs an event instance around the cross button's digital signal.

Parameters
loopthe event loop instance to attach the event to.
Returns
an event instance representing the cross button's digital signal attached to the given loop.

◆ GetCircleButton()

bool wpi::NiDsPS5Controller::GetCircleButton ( ) const

Read the value of the circle button on the controller.

Returns
The state of the button.

◆ GetCircleButtonPressed()

bool wpi::NiDsPS5Controller::GetCircleButtonPressed ( )

Whether the circle button was pressed since the last check.

Returns
Whether the button was pressed since the last check.

◆ GetCircleButtonReleased()

bool wpi::NiDsPS5Controller::GetCircleButtonReleased ( )

Whether the circle button was released since the last check.

Returns
Whether the button was released since the last check.

◆ GetCreateButton()

bool wpi::NiDsPS5Controller::GetCreateButton ( ) const

Read the value of the create button on the controller.

Returns
The state of the button.

◆ GetCreateButtonPressed()

bool wpi::NiDsPS5Controller::GetCreateButtonPressed ( )

Whether the create button was pressed since the last check.

Returns
Whether the button was pressed since the last check.

◆ GetCreateButtonReleased()

bool wpi::NiDsPS5Controller::GetCreateButtonReleased ( )

Whether the create button was released since the last check.

Returns
Whether the button was released since the last check.

◆ GetCrossButton()

bool wpi::NiDsPS5Controller::GetCrossButton ( ) const

Read the value of the cross button on the controller.

Returns
The state of the button.

◆ GetCrossButtonPressed()

bool wpi::NiDsPS5Controller::GetCrossButtonPressed ( )

Whether the cross button was pressed since the last check.

Returns
Whether the button was pressed since the last check.

◆ GetCrossButtonReleased()

bool wpi::NiDsPS5Controller::GetCrossButtonReleased ( )

Whether the cross button was released since the last check.

Returns
Whether the button was released since the last check.

◆ GetL1Button()

bool wpi::NiDsPS5Controller::GetL1Button ( ) const

Read the value of the left trigger 1 button on the controller.

Returns
The state of the button.

◆ GetL1ButtonPressed()

bool wpi::NiDsPS5Controller::GetL1ButtonPressed ( )

Whether the left trigger 1 button was pressed since the last check.

Returns
Whether the button was pressed since the last check.

◆ GetL1ButtonReleased()

bool wpi::NiDsPS5Controller::GetL1ButtonReleased ( )

Whether the left trigger 1 button was released since the last check.

Returns
Whether the button was released since the last check.

◆ GetL2Axis()

double wpi::NiDsPS5Controller::GetL2Axis ( ) const

Get the left trigger 2 axis value of the controller.

Note that this axis is bound to the range of [0, 1] as opposed to the usual [-1, 1].

Returns
the axis value.

◆ GetL2Button()

bool wpi::NiDsPS5Controller::GetL2Button ( ) const

Read the value of the left trigger 2 button on the controller.

Returns
The state of the button.

◆ GetL2ButtonPressed()

bool wpi::NiDsPS5Controller::GetL2ButtonPressed ( )

Whether the left trigger 2 button was pressed since the last check.

Returns
Whether the button was pressed since the last check.

◆ GetL2ButtonReleased()

bool wpi::NiDsPS5Controller::GetL2ButtonReleased ( )

Whether the left trigger 2 button was released since the last check.

Returns
Whether the button was released since the last check.

◆ GetL3Button()

bool wpi::NiDsPS5Controller::GetL3Button ( ) const

Read the value of the L3 (left stick) button on the controller.

Returns
The state of the button.

◆ GetL3ButtonPressed()

bool wpi::NiDsPS5Controller::GetL3ButtonPressed ( )

Whether the L3 (left stick) button was pressed since the last check.

Returns
Whether the button was pressed since the last check.

◆ GetL3ButtonReleased()

bool wpi::NiDsPS5Controller::GetL3ButtonReleased ( )

Whether the L3 (left stick) button was released since the last check.

Returns
Whether the button was released since the last check.

◆ GetLeftX()

double wpi::NiDsPS5Controller::GetLeftX ( ) const

Get the X axis value of left side of the controller.

Right is positive.

Returns
the axis value.

◆ GetLeftY()

double wpi::NiDsPS5Controller::GetLeftY ( ) const

Get the Y axis value of left side of the controller.

Back is positive.

Returns
the axis value.

◆ GetOptionsButton()

bool wpi::NiDsPS5Controller::GetOptionsButton ( ) const

Read the value of the options button on the controller.

Returns
The state of the button.

◆ GetOptionsButtonPressed()

bool wpi::NiDsPS5Controller::GetOptionsButtonPressed ( )

Whether the options button was pressed since the last check.

Returns
Whether the button was pressed since the last check.

◆ GetOptionsButtonReleased()

bool wpi::NiDsPS5Controller::GetOptionsButtonReleased ( )

Whether the options button was released since the last check.

Returns
Whether the button was released since the last check.

◆ GetPSButton()

bool wpi::NiDsPS5Controller::GetPSButton ( ) const

Read the value of the PlayStation button on the controller.

Returns
The state of the button.

◆ GetPSButtonPressed()

bool wpi::NiDsPS5Controller::GetPSButtonPressed ( )

Whether the PlayStation button was pressed since the last check.

Returns
Whether the button was pressed since the last check.

◆ GetPSButtonReleased()

bool wpi::NiDsPS5Controller::GetPSButtonReleased ( )

Whether the PlayStation button was released since the last check.

Returns
Whether the button was released since the last check.

◆ GetR1Button()

bool wpi::NiDsPS5Controller::GetR1Button ( ) const

Read the value of the right trigger 1 button on the controller.

Returns
The state of the button.

◆ GetR1ButtonPressed()

bool wpi::NiDsPS5Controller::GetR1ButtonPressed ( )

Whether the right trigger 1 button was pressed since the last check.

Returns
Whether the button was pressed since the last check.

◆ GetR1ButtonReleased()

bool wpi::NiDsPS5Controller::GetR1ButtonReleased ( )

Whether the right trigger 1 button was released since the last check.

Returns
Whether the button was released since the last check.

◆ GetR2Axis()

double wpi::NiDsPS5Controller::GetR2Axis ( ) const

Get the right trigger 2 axis value of the controller.

Note that this axis is bound to the range of [0, 1] as opposed to the usual [-1, 1].

Returns
the axis value.

◆ GetR2Button()

bool wpi::NiDsPS5Controller::GetR2Button ( ) const

Read the value of the right trigger 2 button on the controller.

Returns
The state of the button.

◆ GetR2ButtonPressed()

bool wpi::NiDsPS5Controller::GetR2ButtonPressed ( )

Whether the right trigger 2 button was pressed since the last check.

Returns
Whether the button was pressed since the last check.

◆ GetR2ButtonReleased()

bool wpi::NiDsPS5Controller::GetR2ButtonReleased ( )

Whether the right trigger 2 button was released since the last check.

Returns
Whether the button was released since the last check.

◆ GetR3Button()

bool wpi::NiDsPS5Controller::GetR3Button ( ) const

Read the value of the R3 (right stick) button on the controller.

Returns
The state of the button.

◆ GetR3ButtonPressed()

bool wpi::NiDsPS5Controller::GetR3ButtonPressed ( )

Whether the R3 (right stick) button was pressed since the last check.

Returns
Whether the button was pressed since the last check.

◆ GetR3ButtonReleased()

bool wpi::NiDsPS5Controller::GetR3ButtonReleased ( )

Whether the R3 (right stick) button was released since the last check.

Returns
Whether the button was released since the last check.

◆ GetRightX()

double wpi::NiDsPS5Controller::GetRightX ( ) const

Get the X axis value of right side of the controller.

Right is positive.

Returns
the axis value.

◆ GetRightY()

double wpi::NiDsPS5Controller::GetRightY ( ) const

Get the Y axis value of right side of the controller.

Back is positive.

Returns
the axis value.

◆ GetSquareButton()

bool wpi::NiDsPS5Controller::GetSquareButton ( ) const

Read the value of the square button on the controller.

Returns
The state of the button.

◆ GetSquareButtonPressed()

bool wpi::NiDsPS5Controller::GetSquareButtonPressed ( )

Whether the square button was pressed since the last check.

Returns
Whether the button was pressed since the last check.

◆ GetSquareButtonReleased()

bool wpi::NiDsPS5Controller::GetSquareButtonReleased ( )

Whether the square button was released since the last check.

Returns
Whether the button was released since the last check.

◆ GetTouchpadButton()

bool wpi::NiDsPS5Controller::GetTouchpadButton ( ) const

Read the value of the touchpad button on the controller.

Returns
The state of the button.

◆ GetTouchpadButtonPressed()

bool wpi::NiDsPS5Controller::GetTouchpadButtonPressed ( )

Whether the touchpad button was pressed since the last check.

Returns
Whether the button was pressed since the last check.

◆ GetTouchpadButtonReleased()

bool wpi::NiDsPS5Controller::GetTouchpadButtonReleased ( )

Whether the touchpad button was released since the last check.

Returns
Whether the button was released since the last check.

◆ GetTriangleButton()

bool wpi::NiDsPS5Controller::GetTriangleButton ( ) const

Read the value of the triangle button on the controller.

Returns
The state of the button.

◆ GetTriangleButtonPressed()

bool wpi::NiDsPS5Controller::GetTriangleButtonPressed ( )

Whether the triangle button was pressed since the last check.

Returns
Whether the button was pressed since the last check.

◆ GetTriangleButtonReleased()

bool wpi::NiDsPS5Controller::GetTriangleButtonReleased ( )

Whether the triangle button was released since the last check.

Returns
Whether the button was released since the last check.

◆ InitSendable()

void wpi::NiDsPS5Controller::InitSendable ( wpi::util::SendableBuilder & builder)
overridevirtual

Initializes this Sendable object.

Parameters
buildersendable builder

Implements wpi::util::Sendable.

◆ L1()

BooleanEvent wpi::NiDsPS5Controller::L1 ( EventLoop * loop) const

Constructs an event instance around the left trigger 1 button's digital signal.

Parameters
loopthe event loop instance to attach the event to.
Returns
an event instance representing the left trigger 1 button's digital signal attached to the given loop.

◆ L2()

BooleanEvent wpi::NiDsPS5Controller::L2 ( EventLoop * loop) const

Constructs an event instance around the left trigger 2 button's digital signal.

Parameters
loopthe event loop instance to attach the event to.
Returns
an event instance representing the left trigger 2 button's digital signal attached to the given loop.

◆ L3()

BooleanEvent wpi::NiDsPS5Controller::L3 ( EventLoop * loop) const

Constructs an event instance around the L3 (left stick) button's digital signal.

Parameters
loopthe event loop instance to attach the event to.
Returns
an event instance representing the L3 (left stick) button's digital signal attached to the given loop.

◆ operator=()

NiDsPS5Controller & wpi::NiDsPS5Controller::operator= ( NiDsPS5Controller && )
default

◆ Options()

BooleanEvent wpi::NiDsPS5Controller::Options ( EventLoop * loop) const

Constructs an event instance around the options button's digital signal.

Parameters
loopthe event loop instance to attach the event to.
Returns
an event instance representing the options button's digital signal attached to the given loop.

◆ PS()

BooleanEvent wpi::NiDsPS5Controller::PS ( EventLoop * loop) const

Constructs an event instance around the PlayStation button's digital signal.

Parameters
loopthe event loop instance to attach the event to.
Returns
an event instance representing the PlayStation button's digital signal attached to the given loop.

◆ R1()

BooleanEvent wpi::NiDsPS5Controller::R1 ( EventLoop * loop) const

Constructs an event instance around the right trigger 1 button's digital signal.

Parameters
loopthe event loop instance to attach the event to.
Returns
an event instance representing the right trigger 1 button's digital signal attached to the given loop.

◆ R2()

BooleanEvent wpi::NiDsPS5Controller::R2 ( EventLoop * loop) const

Constructs an event instance around the right trigger 2 button's digital signal.

Parameters
loopthe event loop instance to attach the event to.
Returns
an event instance representing the right trigger 2 button's digital signal attached to the given loop.

◆ R3()

BooleanEvent wpi::NiDsPS5Controller::R3 ( EventLoop * loop) const

Constructs an event instance around the R3 (right stick) button's digital signal.

Parameters
loopthe event loop instance to attach the event to.
Returns
an event instance representing the R3 (right stick) button's digital signal attached to the given loop.

◆ Square()

BooleanEvent wpi::NiDsPS5Controller::Square ( EventLoop * loop) const

Constructs an event instance around the square button's digital signal.

Parameters
loopthe event loop instance to attach the event to.
Returns
an event instance representing the square button's digital signal attached to the given loop.

◆ Touchpad()

BooleanEvent wpi::NiDsPS5Controller::Touchpad ( EventLoop * loop) const

Constructs an event instance around the touchpad button's digital signal.

Parameters
loopthe event loop instance to attach the event to.
Returns
an event instance representing the touchpad button's digital signal attached to the given loop.

◆ Triangle()

BooleanEvent wpi::NiDsPS5Controller::Triangle ( EventLoop * loop) const

Constructs an event instance around the triangle button's digital signal.

Parameters
loopthe event loop instance to attach the event to.
Returns
an event instance representing the triangle button's digital signal attached to the given loop.

The documentation for this class was generated from the following file: