174 uint16_t
getX(uint8_t finger = 0, uint8_t xyId = 0) {
175 return ps4Data.
xy[xyId].
finger[finger].
x;
186 uint16_t
getY(uint8_t finger = 0, uint8_t xyId = 0) {
187 return ps4Data.
xy[xyId].
finger[finger].
y;
221 return (atan2(ps4Data.
accY, ps4Data.
accZ) + PI) * RAD_TO_DEG;
223 return (atan2(ps4Data.
accX, ps4Data.
accZ) + PI) * RAD_TO_DEG;
234 return ps4Data.
gyroX;
236 return ps4Data.
gyroY;
238 return ps4Data.
gyroZ;
257 void Parse(uint8_t len, uint8_t *buf);
262 for (i = 0; i <
sizeof(ps4Data.
hatValue); i++)
266 oldButtonState.
val[i] = 0;
268 for (i = 0; i <
sizeof(ps4Data.
trigger); i++)
270 for (i = 0; i <
sizeof(ps4Data.
xy)/
sizeof(ps4Data.
xy[0]); i++) {
271 for (uint8_t j = 0; j <
sizeof(ps4Data.
xy[0].
finger)/
sizeof(ps4Data.
xy[0].
finger[0]); j++)
277 buttonClickState.
dpad = 0;
uint16_t getY(uint8_t finger=0, uint8_t xyId=0)
double getAngle(AngleEnum a)
bool getButtonPress(ButtonEnum b)
int16_t getSensor(SensorEnum s)
void Parse(uint8_t len, uint8_t *buf)
bool isTouching(uint8_t finger=0, uint8_t xyId=0)
const uint8_t PS4_BUTTONS[]
uint16_t getX(uint8_t finger=0, uint8_t xyId=0)
uint8_t getTouchCounter(uint8_t finger=0, uint8_t xyId=0)
uint8_t getAnalogButton(ButtonEnum b)
bool getButtonClick(ButtonEnum b)
uint8_t getAnalogHat(AnalogHatEnum a)
struct touchpadXY::@24 finger[2]