The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

authored by

Jan Schmidt and committed by
Jakob Bornecrantz
e0b5070f e18288cc

+15 -8
+12 -5
src/xrt/drivers/wmr/wmr_hmd.c
··· 76 76 } 77 77 78 78 static void 79 - hololens_unknown_05_06_0E_decode_packet(struct wmr_hmd *wh, const unsigned char *buffer, int size) 79 + hololens_handle_bt_iface_packet(struct wmr_hmd *wh, const unsigned char *buffer, int size) 80 + { 81 + } 82 + 83 + static void 84 + hololens_handle_controller_packet(struct wmr_hmd *wh, const unsigned char *buffer, int size) 80 85 { 81 86 if (size >= 45) { 82 87 WMR_TRACE(wh, ··· 211 216 212 217 break; 213 218 } 214 - case WMR_MS_HOLOLENS_MSG_UNKNOWN_05: 215 - case WMR_MS_HOLOLENS_MSG_UNKNOWN_06: 216 - case WMR_MS_HOLOLENS_MSG_UNKNOWN_0E: // 217 - hololens_unknown_05_06_0E_decode_packet(wh, buffer, size); 219 + case WMR_MS_HOLOLENS_MSG_BT_IFACE: // 220 + hololens_handle_bt_iface_packet(wh, buffer, size); 221 + break; 222 + case WMR_MS_HOLOLENS_MSG_LEFT_CONTROLLER: 223 + case WMR_MS_HOLOLENS_MSG_RIGHT_CONTROLLER: // 224 + hololens_handle_controller_packet(wh, buffer, size); 218 225 break; 219 226 case WMR_MS_HOLOLENS_MSG_UNKNOWN_17: // 220 227 hololens_unknown_17_decode_packet(wh, buffer, size);
+3 -3
src/xrt/drivers/wmr/wmr_protocol.h
··· 34 34 #define WMR_MS_HOLOLENS_MSG_SENSORS 0x01 35 35 #define WMR_MS_HOLOLENS_MSG_CONTROL 0x02 // Integrated motion controller messages? 36 36 #define WMR_MS_HOLOLENS_MSG_DEBUG 0x03 37 - #define WMR_MS_HOLOLENS_MSG_UNKNOWN_05 0x05 38 - #define WMR_MS_HOLOLENS_MSG_UNKNOWN_06 0x06 39 - #define WMR_MS_HOLOLENS_MSG_UNKNOWN_0E 0x0E 37 + #define WMR_MS_HOLOLENS_MSG_BT_IFACE 0x05 /* Bluetooth interface */ 38 + #define WMR_MS_HOLOLENS_MSG_LEFT_CONTROLLER 0x06 /* Left controller */ 39 + #define WMR_MS_HOLOLENS_MSG_RIGHT_CONTROLLER 0x0E /* Right controller */ 40 40 #define WMR_MS_HOLOLENS_MSG_UNKNOWN_17 0x17 41 41 42 42 // Messages types specific to WMR Hololens Sensors' companion devices