From 948d78fb6139e5b5e685d825ca037e885549c240 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 22 May 2023 01:27:34 +1000 Subject: [PATCH] d/wmr: Change public name for G2 controllers Change the published device name for G2 controllers from the generic 'WMR Controller' --- src/xrt/drivers/wmr/wmr_controller_hp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/xrt/drivers/wmr/wmr_controller_hp.c b/src/xrt/drivers/wmr/wmr_controller_hp.c index 8ba7c5038..5c7034e96 100644 --- a/src/xrt/drivers/wmr/wmr_controller_hp.c +++ b/src/xrt/drivers/wmr/wmr_controller_hp.c @@ -326,6 +326,13 @@ wmr_controller_hp_create(struct wmr_controller_connection *conn, wcb->handle_input_packet = handle_input_packet; wcb->base.name = XRT_DEVICE_HP_REVERB_G2_CONTROLLER; + + if (controller_type == XRT_DEVICE_TYPE_LEFT_HAND_CONTROLLER) { + snprintf(wcb->base.str, ARRAY_SIZE(wcb->base.str), "HP Reverb G2 Left Controller"); + } else { + snprintf(wcb->base.str, ARRAY_SIZE(wcb->base.str), "HP Reverb G2 Right Controller"); + } + wcb->base.destroy = wmr_controller_hp_destroy; wcb->base.update_inputs = wmr_controller_hp_update_xrt_inputs; wcb->base.set_output = wmr_controller_hp_set_output;