|
| PS4Controller (int port) |
| Construct an instance of an PS4 controller. More...
|
|
| ~PS4Controller () override=default |
|
| PS4Controller (PS4Controller &&)=default |
|
PS4Controller & | operator= (PS4Controller &&)=default |
|
double | GetLeftX () const |
| Get the X axis value of left side of the controller. More...
|
|
double | GetRightX () const |
| Get the X axis value of right side of the controller. More...
|
|
double | GetLeftY () const |
| Get the Y axis value of left side of the controller. More...
|
|
double | GetRightY () const |
| Get the Y axis value of right side of the controller. More...
|
|
double | GetL2Axis () const |
| Get the L2 axis value of the controller. More...
|
|
double | GetR2Axis () const |
| Get the R2 axis value of the controller. More...
|
|
bool | GetSquareButton () const |
| Read the value of the Square button on the controller. More...
|
|
bool | GetSquareButtonPressed () |
| Whether the Square button was pressed since the last check. More...
|
|
bool | GetSquareButtonReleased () |
| Whether the Square button was released since the last check. More...
|
|
BooleanEvent | Square (EventLoop *loop) const |
| Constructs an event instance around the square button's digital signal. More...
|
|
bool | GetCrossButton () const |
| Read the value of the Cross button on the controller. More...
|
|
bool | GetCrossButtonPressed () |
| Whether the Cross button was pressed since the last check. More...
|
|
bool | GetCrossButtonReleased () |
| Whether the Cross button was released since the last check. More...
|
|
BooleanEvent | Cross (EventLoop *loop) const |
| Constructs an event instance around the cross button's digital signal. More...
|
|
bool | GetCircleButton () const |
| Read the value of the Circle button on the controller. More...
|
|
bool | GetCircleButtonPressed () |
| Whether the Circle button was pressed since the last check. More...
|
|
bool | GetCircleButtonReleased () |
| Whether the Circle button was released since the last check. More...
|
|
BooleanEvent | Circle (EventLoop *loop) const |
| Constructs an event instance around the circle button's digital signal. More...
|
|
bool | GetTriangleButton () const |
| Read the value of the Triangle button on the controller. More...
|
|
bool | GetTriangleButtonPressed () |
| Whether the Triangle button was pressed since the last check. More...
|
|
bool | GetTriangleButtonReleased () |
| Whether the Triangle button was released since the last check. More...
|
|
BooleanEvent | Triangle (EventLoop *loop) const |
| Constructs an event instance around the triangle button's digital signal. More...
|
|
bool | GetL1Button () const |
| Read the value of the L1 button on the controller. More...
|
|
bool | GetL1ButtonPressed () |
| Whether the L1 button was pressed since the last check. More...
|
|
bool | GetL1ButtonReleased () |
| Whether the L1 button was released since the last check. More...
|
|
BooleanEvent | L1 (EventLoop *loop) const |
| Constructs an event instance around the L1 button's digital signal. More...
|
|
bool | GetR1Button () const |
| Read the value of the R1 button on the controller. More...
|
|
bool | GetR1ButtonPressed () |
| Whether the R1 button was pressed since the last check. More...
|
|
bool | GetR1ButtonReleased () |
| Whether the R1 button was released since the last check. More...
|
|
BooleanEvent | R1 (EventLoop *loop) const |
| Constructs an event instance around the R1 button's digital signal. More...
|
|
bool | GetL2Button () const |
| Read the value of the L2 button on the controller. More...
|
|
bool | GetL2ButtonPressed () |
| Whether the L2 button was pressed since the last check. More...
|
|
bool | GetL2ButtonReleased () |
| Whether the L2 button was released since the last check. More...
|
|
BooleanEvent | L2 (EventLoop *loop) const |
| Constructs an event instance around the L2 button's digital signal. More...
|
|
bool | GetR2Button () const |
| Read the value of the R2 button on the controller. More...
|
|
bool | GetR2ButtonPressed () |
| Whether the R2 button was pressed since the last check. More...
|
|
bool | GetR2ButtonReleased () |
| Whether the R2 button was released since the last check. More...
|
|
BooleanEvent | R2 (EventLoop *loop) const |
| Constructs an event instance around the R2 button's digital signal. More...
|
|
bool | GetShareButton () const |
| Read the value of the Share button on the controller. More...
|
|
bool | GetShareButtonPressed () |
| Whether the Share button was pressed since the last check. More...
|
|
bool | GetShareButtonReleased () |
| Whether the Share button was released since the last check. More...
|
|
BooleanEvent | Share (EventLoop *loop) const |
| Constructs an event instance around the share button's digital signal. More...
|
|
bool | GetOptionsButton () const |
| Read the value of the Options button on the controller. More...
|
|
bool | GetOptionsButtonPressed () |
| Whether the Options button was pressed since the last check. More...
|
|
bool | GetOptionsButtonReleased () |
| Whether the Options button was released since the last check. More...
|
|
BooleanEvent | Options (EventLoop *loop) const |
| Constructs an event instance around the options button's digital signal. More...
|
|
bool | GetL3Button () const |
| Read the value of the L3 button (pressing the left analog stick) on the controller. More...
|
|
bool | GetL3ButtonPressed () |
| Whether the L3 (left stick) button was pressed since the last check. More...
|
|
bool | GetL3ButtonReleased () |
| Whether the L3 (left stick) button was released since the last check. More...
|
|
BooleanEvent | L3 (EventLoop *loop) const |
| Constructs an event instance around the L3 button's digital signal. More...
|
|
bool | GetR3Button () const |
| Read the value of the R3 button (pressing the right analog stick) on the controller. More...
|
|
bool | GetR3ButtonPressed () |
| Whether the R3 (right stick) button was pressed since the last check. More...
|
|
bool | GetR3ButtonReleased () |
| Whether the R3 (right stick) button was released since the last check. More...
|
|
BooleanEvent | R3 (EventLoop *loop) const |
| Constructs an event instance around the R3 button's digital signal. More...
|
|
bool | GetPSButton () const |
| Read the value of the PS button on the controller. More...
|
|
bool | GetPSButtonPressed () |
| Whether the PS button was pressed since the last check. More...
|
|
bool | GetPSButtonReleased () |
| Whether the PS button was released since the last check. More...
|
|
BooleanEvent | PS (EventLoop *loop) const |
| Constructs an event instance around the PS button's digital signal. More...
|
|
bool | GetTouchpad () const |
| Read the value of the touchpad button on the controller. More...
|
|
bool | GetTouchpadPressed () |
| Whether the touchpad was pressed since the last check. More...
|
|
bool | GetTouchpadReleased () |
| Whether the touchpad was released since the last check. More...
|
|
BooleanEvent | Touchpad (EventLoop *loop) const |
| Constructs an event instance around the touchpad's digital signal. More...
|
|
| GenericHID (int port) |
|
virtual | ~GenericHID ()=default |
|
| GenericHID (GenericHID &&)=default |
|
GenericHID & | operator= (GenericHID &&)=default |
|
bool | GetRawButton (int button) const |
| Get the button value (starting at button 1). More...
|
|
bool | GetRawButtonPressed (int button) |
| Whether the button was pressed since the last check. More...
|
|
bool | GetRawButtonReleased (int button) |
| Whether the button was released since the last check. More...
|
|
BooleanEvent | Button (int button, EventLoop *loop) const |
| Constructs an event instance around this button's digital signal. More...
|
|
double | GetRawAxis (int axis) const |
| Get the value of the axis. More...
|
|
int | GetPOV (int pov=0) const |
| Get the angle in degrees of a POV on the HID. More...
|
|
BooleanEvent | POV (int angle, EventLoop *loop) const |
| Constructs a BooleanEvent instance based around this angle of a POV on the HID. More...
|
|
BooleanEvent | POV (int pov, int angle, EventLoop *loop) const |
| Constructs a BooleanEvent instance based around this angle of a POV on the HID. More...
|
|
BooleanEvent | POVUp (EventLoop *loop) const |
| Constructs a BooleanEvent instance based around the 0 degree angle (up) of the default (index 0) POV on the HID. More...
|
|
BooleanEvent | POVUpRight (EventLoop *loop) const |
| Constructs a BooleanEvent instance based around the 45 degree angle (right up) of the default (index 0) POV on the HID. More...
|
|
BooleanEvent | POVRight (EventLoop *loop) const |
| Constructs a BooleanEvent instance based around the 90 degree angle (right) of the default (index 0) POV on the HID. More...
|
|
BooleanEvent | POVDownRight (EventLoop *loop) const |
| Constructs a BooleanEvent instance based around the 135 degree angle (right down) of the default (index 0) POV on the HID. More...
|
|
BooleanEvent | POVDown (EventLoop *loop) const |
| Constructs a BooleanEvent instance based around the 180 degree angle (down) of the default (index 0) POV on the HID. More...
|
|
BooleanEvent | POVDownLeft (EventLoop *loop) const |
| Constructs a BooleanEvent instance based around the 225 degree angle (down left) of the default (index 0) POV on the HID. More...
|
|
BooleanEvent | POVLeft (EventLoop *loop) const |
| Constructs a BooleanEvent instance based around the 270 degree angle (left) of the default (index 0) POV on the HID. More...
|
|
BooleanEvent | POVUpLeft (EventLoop *loop) const |
| Constructs a BooleanEvent instance based around the 315 degree angle (left up) of the default (index 0) POV on the HID. More...
|
|
BooleanEvent | POVCenter (EventLoop *loop) const |
| Constructs a BooleanEvent instance based around the center (not pressed) of the default (index 0) POV on the HID. More...
|
|
BooleanEvent | AxisLessThan (int axis, double threshold, EventLoop *loop) const |
| Constructs an event instance that is true when the axis value is less than threshold. More...
|
|
BooleanEvent | AxisGreaterThan (int axis, double threshold, EventLoop *loop) const |
| Constructs an event instance that is true when the axis value is greater than threshold. More...
|
|
int | GetAxisCount () const |
| Get the number of axes for the HID. More...
|
|
int | GetPOVCount () const |
| Get the number of POVs for the HID. More...
|
|
int | GetButtonCount () const |
| Get the number of buttons for the HID. More...
|
|
bool | IsConnected () const |
| Get if the HID is connected. More...
|
|
GenericHID::HIDType | GetType () const |
| Get the type of the HID. More...
|
|
std::string | GetName () const |
| Get the name of the HID. More...
|
|
int | GetAxisType (int axis) const |
| Get the axis type of a joystick axis. More...
|
|
int | GetPort () const |
| Get the port number of the HID. More...
|
|
void | SetOutput (int outputNumber, bool value) |
| Set a single HID output value for the HID. More...
|
|
void | SetOutputs (int value) |
| Set all output values for the HID. More...
|
|
void | SetRumble (RumbleType type, double value) |
| Set the rumble output for the HID. More...
|
|
Handle input from PS4 controllers connected to the Driver Station.
This class handles PS4 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.