70 } __attribute__((packed));
72 } __attribute__((packed));
82 } __attribute__((packed));
90 } __attribute__((packed));
114 } __attribute__((packed));
121 } __attribute__((packed));
170 uint16_t
getX(uint8_t finger = 0, uint8_t xyId = 0) {
171 return ps4Data.
xy[xyId].
finger[finger].
x;
182 uint16_t
getY(uint8_t finger = 0, uint8_t xyId = 0) {
183 return ps4Data.
xy[xyId].
finger[finger].
y;
217 return (atan2f(ps4Data.
accY, ps4Data.
accZ) + PI) * RAD_TO_DEG;
219 return (atan2f(ps4Data.
accX, ps4Data.
accZ) + PI) * RAD_TO_DEG;
230 return ps4Data.
gyroX;
232 return ps4Data.
gyroY;
234 return ps4Data.
gyroZ;
320 void setLed(uint8_t r, uint8_t g, uint8_t b) {
332 setLed((uint8_t)(color >> 16), (uint8_t)(color >> 8), (uint8_t)(color));
353 void Parse(uint8_t len, uint8_t *buf);
365 static int8_t getButtonIndexPS4(
ButtonEnum b);
const uint8_t PS4_BUTTONS[]
uint8_t getTouchCounter(uint8_t finger=0, uint8_t xyId=0)
void setLedFlash(uint8_t flashOn, uint8_t flashOff)
int16_t getSensor(SensorEnum s)
void setLed(uint8_t r, uint8_t g, uint8_t b)
void setRumbleOn(RumbleEnum mode)
void setLed(ColorsEnum color)
void Parse(uint8_t len, uint8_t *buf)
uint8_t getAnalogButton(ButtonEnum b)
bool isTouching(uint8_t finger=0, uint8_t xyId=0)
void setRumbleOn(uint8_t bigRumble, uint8_t smallRumble)
virtual void sendOutputReport(PS4Output *output)=0
bool getButtonClick(ButtonEnum b)
uint8_t getBatteryLevel()
uint16_t getY(uint8_t finger=0, uint8_t xyId=0)
uint8_t getAnalogHat(AnalogHatEnum a)
uint16_t getX(uint8_t finger=0, uint8_t xyId=0)
bool getButtonPress(ButtonEnum b)
float getAngle(AngleEnum a)
struct touchpadXY::@28 finger[2]