mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
d/wmr: Log larger Device Status messages
HP Reverb G2 sends larger device status messages with unknown content. Log how large they are, and at least dump the first 11 bytes
This commit is contained in:
parent
ed54b7899c
commit
87d804c7d6
|
@ -547,8 +547,13 @@ control_read_packets(struct wmr_hmd *wh)
|
|||
case WMR_CONTROL_MSG_DEVICE_STATUS: //
|
||||
WMR_DEBUG(wh, "Device status message type: %02x (size %i)", buffer[0], size);
|
||||
if (size != 11) {
|
||||
WMR_DEBUG(wh, "---> Unexpected message size. Expected 11 bytes incl. message type.");
|
||||
break;
|
||||
WMR_DEBUG(wh,
|
||||
"---> Unexpected message size. Expected 11 bytes incl. message type. Got %d bytes",
|
||||
size);
|
||||
WMR_DEBUG_HEX(wh, buffer, size);
|
||||
if (size < 11) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Todo: HMD state info to be decoded further.
|
||||
|
@ -568,6 +573,7 @@ control_read_packets(struct wmr_hmd *wh)
|
|||
break;
|
||||
default: //
|
||||
WMR_DEBUG(wh, "Unknown message type: %02x (size %i)", buffer[0], size);
|
||||
WMR_DEBUG_HEX(wh, buffer, size);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -207,6 +207,7 @@ wmr_hmd_create(enum wmr_headset_type hmd_type,
|
|||
|
||||
#define WMR_TRACE(d, ...) U_LOG_XDEV_IFL_T(&d->base, d->log_level, __VA_ARGS__)
|
||||
#define WMR_DEBUG(d, ...) U_LOG_XDEV_IFL_D(&d->base, d->log_level, __VA_ARGS__)
|
||||
#define WMR_DEBUG_HEX(d, data, data_size) U_LOG_XDEV_IFL_D_HEX(&d->base, d->log_level, data, data_size)
|
||||
#define WMR_INFO(d, ...) U_LOG_XDEV_IFL_I(&d->base, d->log_level, __VA_ARGS__)
|
||||
#define WMR_WARN(d, ...) U_LOG_XDEV_IFL_W(&d->base, d->log_level, __VA_ARGS__)
|
||||
#define WMR_ERROR(d, ...) U_LOG_XDEV_IFL_E(&d->base, d->log_level, __VA_ARGS__)
|
||||
|
|
Loading…
Reference in a new issue