mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Do not try to parse the PS5 status byte for now
This commit is contained in:
parent
9a0a4940b3
commit
fdb0ee31e7
1 changed files with 9 additions and 3 deletions
12
PS5Parser.h
12
PS5Parser.h
|
@ -124,6 +124,7 @@ struct PS5Data {
|
||||||
// 0x24 - 0x27 touchpad point 2
|
// 0x24 - 0x27 touchpad point 2
|
||||||
ps5TouchpadXY xy;
|
ps5TouchpadXY xy;
|
||||||
|
|
||||||
|
#if 0 // The status byte depends on if it's sent via USB or Bluetooth, so is not parsed for now
|
||||||
uint8_t reserved3; // 0x28
|
uint8_t reserved3; // 0x28
|
||||||
|
|
||||||
uint8_t rightTriggerFeedback; // 0x29
|
uint8_t rightTriggerFeedback; // 0x29
|
||||||
|
@ -132,6 +133,7 @@ struct PS5Data {
|
||||||
|
|
||||||
// status bytes 0x35-0x36
|
// status bytes 0x35-0x36
|
||||||
PS5Status status;
|
PS5Status status;
|
||||||
|
#endif
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
struct PS5Output {
|
struct PS5Output {
|
||||||
|
@ -256,14 +258,17 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0 // Seems to only be available via Bluetooth, so have been disabled for now
|
||||||
/**
|
/**
|
||||||
* Return the battery level of the PS5 controller.
|
* Return the battery level of the PS5 controller.
|
||||||
* @return The battery level in the range 0-15.
|
* @return The battery level in the range 0-15.
|
||||||
*/
|
*/
|
||||||
/*uint8_t getBatteryLevel() {
|
uint8_t getBatteryLevel() {
|
||||||
return ps5Data.status.battery; // TODO: Where to read the battery level?
|
return ps5Data.status.battery;
|
||||||
};*/
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if 0 // These are only valid via USB, so have been commented out for now
|
||||||
/**
|
/**
|
||||||
* Use this to check if an USB cable is connected to the PS5 controller.
|
* Use this to check if an USB cable is connected to the PS5 controller.
|
||||||
* @return Returns true if an USB cable is connected.
|
* @return Returns true if an USB cable is connected.
|
||||||
|
@ -287,6 +292,7 @@ public:
|
||||||
bool getMicStatus() {
|
bool getMicStatus() {
|
||||||
return ps5Data.status.mic;
|
return ps5Data.status.mic;
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/** Turn both rumble and the LEDs off. */
|
/** Turn both rumble and the LEDs off. */
|
||||||
void setAllOff() {
|
void setAllOff() {
|
||||||
|
|
Loading…
Reference in a new issue