d/wmr: Rename controller related packets

Rename the controller and bluetooth related packets
according to their usage, and split out the
controller update handling function.
This commit is contained in:
Jan Schmidt 2021-11-14 21:10:57 +11:00 committed by Jakob Bornecrantz
parent e18288cc57
commit e0b5070f49
2 changed files with 15 additions and 8 deletions

View file

@ -76,7 +76,12 @@ hololens_unknown_17_decode_packet(struct wmr_hmd *wh, const unsigned char *buffe
}
static void
hololens_unknown_05_06_0E_decode_packet(struct wmr_hmd *wh, const unsigned char *buffer, int size)
hololens_handle_bt_iface_packet(struct wmr_hmd *wh, const unsigned char *buffer, int size)
{
}
static void
hololens_handle_controller_packet(struct wmr_hmd *wh, const unsigned char *buffer, int size)
{
if (size >= 45) {
WMR_TRACE(wh,
@ -211,10 +216,12 @@ hololens_sensors_read_packets(struct wmr_hmd *wh)
break;
}
case WMR_MS_HOLOLENS_MSG_UNKNOWN_05:
case WMR_MS_HOLOLENS_MSG_UNKNOWN_06:
case WMR_MS_HOLOLENS_MSG_UNKNOWN_0E: //
hololens_unknown_05_06_0E_decode_packet(wh, buffer, size);
case WMR_MS_HOLOLENS_MSG_BT_IFACE: //
hololens_handle_bt_iface_packet(wh, buffer, size);
break;
case WMR_MS_HOLOLENS_MSG_LEFT_CONTROLLER:
case WMR_MS_HOLOLENS_MSG_RIGHT_CONTROLLER: //
hololens_handle_controller_packet(wh, buffer, size);
break;
case WMR_MS_HOLOLENS_MSG_UNKNOWN_17: //
hololens_unknown_17_decode_packet(wh, buffer, size);

View file

@ -34,9 +34,9 @@ extern "C" {
#define WMR_MS_HOLOLENS_MSG_SENSORS 0x01
#define WMR_MS_HOLOLENS_MSG_CONTROL 0x02 // Integrated motion controller messages?
#define WMR_MS_HOLOLENS_MSG_DEBUG 0x03
#define WMR_MS_HOLOLENS_MSG_UNKNOWN_05 0x05
#define WMR_MS_HOLOLENS_MSG_UNKNOWN_06 0x06
#define WMR_MS_HOLOLENS_MSG_UNKNOWN_0E 0x0E
#define WMR_MS_HOLOLENS_MSG_BT_IFACE 0x05 /* Bluetooth interface */
#define WMR_MS_HOLOLENS_MSG_LEFT_CONTROLLER 0x06 /* Left controller */
#define WMR_MS_HOLOLENS_MSG_RIGHT_CONTROLLER 0x0E /* Right controller */
#define WMR_MS_HOLOLENS_MSG_UNKNOWN_17 0x17
// Messages types specific to WMR Hololens Sensors' companion devices