···562562 };
563563 struct wmr_controller_fw_cmd_response fw_cmd_response;
564564565565- /* Zero command. Clears controller state? */
565565+ /* Zero command. Reinits controller internal state */
566566 fw_cmd = WMR_CONTROLLER_FW_CMD_INIT(0x06, 0x0, 0, 0);
567567 if (wmr_controller_send_fw_cmd(wcb, &fw_cmd, 0x06, &fw_cmd_response) < 0) {
568568 return false;
569569 }
570570571571- /* Unknown what this one does. No obvious effect */
571571+ /* Quiesce/restart controller tasks */
572572 fw_cmd = WMR_CONTROLLER_FW_CMD_INIT(0x06, 0x04, 0xc1, 0x02);
573573 if (wmr_controller_send_fw_cmd(wcb, &fw_cmd, 0x06, &fw_cmd_response) < 0) {
574574 return false;
···579579 return false;
580580 }
581581582582- /* Enable the status reports, IMU and touchpad */
582582+ /* Enable the status reports, IMU and control status reports */
583583 const unsigned char wmr_controller_status_enable_cmd[64] = {0x06, 0x03, 0x01, 0x00, 0x02};
584584 wmr_controller_send_bytes(wcb, wmr_controller_status_enable_cmd, sizeof(wmr_controller_status_enable_cmd));
585585 const unsigned char wmr_controller_imu_on_cmd[64] = {0x06, 0x03, 0x02, 0xe1, 0x02};
+6-4
src/xrt/drivers/wmr/wmr_controller_base.h
···3838 * The controller implementation doesn't need to care how
3939 * the communication is implemented.
4040 *
4141- * The connection is reference counted and mutex protected,
4242- * as both the controller and the connection implementation
4343- * may need to hold a reference to it, and to detach
4444- * safely when shutting down.
4141+ * The HMD-tunnelled version of the connection is reference
4242+ * counted and mutex protected, as both the controller and
4343+ * the HMD need to hold a reference to it to clean up safely.
4444+ * For bluetooth controllers, destruction of the controller
4545+ * xrt_device calls disconnect and destroys the connection
4646+ * object (and bluetooth listener) immediately.
4547 */
4648struct wmr_controller_connection
4749{