70 } __attribute__((packed));
72 } __attribute__((packed));
81 } __attribute__((packed))
finger[2];
82 } __attribute__((packed));
90 } __attribute__((packed));
114 } __attribute__((packed));
121 } __attribute__((packed));
171 return ps4Data.xy[xyId].finger[
finger].x;
183 return ps4Data.xy[xyId].finger[
finger].y;
195 return !(ps4Data.xy[xyId].finger[
finger].touching);
207 return ps4Data.xy[xyId].finger[
finger].counter;
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;
251 return ps4Data.status.battery;
259 return ps4Data.status.usb;
267 return ps4Data.status.audio;
275 return ps4Data.status.mic;
295 setRumbleOn(0x00, 0xFF);
297 setRumbleOn(0xFF, 0x00);
306 ps4Output.bigRumble = bigRumble;
307 ps4Output.smallRumble = smallRumble;
308 ps4Output.reportChanged =
true;
320 void setLed(uint8_t r, uint8_t g, uint8_t b) {
324 ps4Output.reportChanged =
true;
332 setLed((uint8_t)(color >> 16), (uint8_t)(color >> 8), (uint8_t)(color));
341 ps4Output.flashOn = flashOn;
342 ps4Output.flashOff = flashOff;
343 ps4Output.reportChanged =
true;
353 void Parse(uint8_t len, uint8_t *buf);
362 virtual void sendOutputReport(
PS4Output *output) = 0;
uint8_t getBatteryLevel()
uint16_t getY(uint8_t finger=0, uint8_t xyId=0)
void setLed(uint8_t r, uint8_t g, uint8_t b)
void setLed(ColorsEnum color)
void setRumbleOn(uint8_t bigRumble, uint8_t smallRumble)
int16_t getSensor(SensorEnum s)
void setRumbleOn(RumbleEnum mode)
bool isTouching(uint8_t finger=0, uint8_t xyId=0)
const uint8_t PS4_BUTTONS[]
struct touchpadXY::@30 finger[2]
uint16_t getX(uint8_t finger=0, uint8_t xyId=0)
float getAngle(AngleEnum a)
uint8_t getTouchCounter(uint8_t finger=0, uint8_t xyId=0)
void setLedFlash(uint8_t flashOn, uint8_t flashOff)