USB Host Shield 2.0
|
#include <PS4BT.h>
Public Member Functions | |
PS4BT (BTHID *p) | |
virtual void | Parse (HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf) |
bool | connected () |
void | disconnect () |
void | pair (void) |
void | Reset () |
void | attachOnInit (void(*funcOnInit)(void)) |
PS4 Controller functions | |
bool | getButtonPress (ButtonEnum b) |
bool | getButtonClick (ButtonEnum b) |
uint8_t | getAnalogButton (ButtonEnum a) |
uint8_t | getAnalogHat (AnalogHatEnum a) |
This BluetoothService class implements support for the PS4 controller via Bluetooth.
|
inline |
|
virtual |
Implements HIDReportParser.
bool PS4BT::getButtonPress | ( | ButtonEnum | b | ) |
getButtonPress(ButtonEnum b) will return true as long as the button is held down.
While getButtonClick(ButtonEnum b) will only return it once.
So you instance if you need to increase a variable once you would use getButtonClick(ButtonEnum b), but if you need to drive a robot forward you would use getButtonPress(ButtonEnum b).
b | ButtonEnum to read. |
bool PS4BT::getButtonClick | ( | ButtonEnum | b | ) |
getButtonPress(ButtonEnum b) will return true as long as the button is held down.
While getButtonClick(ButtonEnum b) will only return it once.
So you instance if you need to increase a variable once you would use getButtonClick(ButtonEnum b), but if you need to drive a robot forward you would use getButtonPress(ButtonEnum b).
b | ButtonEnum to read. |
uint8_t PS4BT::getAnalogButton | ( | ButtonEnum | a | ) |
uint8_t PS4BT::getAnalogHat | ( | AnalogHatEnum | a | ) |
|
inline |
|
inline |
|
inline |
|
inline |