xrt: Adds new xrt_device_name entry for XR_EXT_hand_interaction

Prior to this, the existing `xrt_device_name` entry
`XRT_DEVICE_HAND_INTERACTION` was re-used for `XR_EXT_hand_interaction`
bindings however this `xrt_device_name` is used to look up the older
hand-interaction profile `XR_MSFT_hand_interaction`. This commit adds a new
`xrt_device_name` entry dedicated for `XR_EXT_hand_interaction` and fixes the
incorrect profile look for suggested bindings during runtime.
This commit is contained in:
Korcan Hussein 2023-07-27 10:55:00 +01:00 committed by Jakob Bornecrantz
parent e39e0ee5ff
commit 71dcc61ed2
4 changed files with 11 additions and 4 deletions

View file

@ -25,7 +25,7 @@
"/virtual_profiles/ext/hand_interaction_poses": {
"title": "Ext Hand Interaction Poses",
"type": "tracked_controller",
"monado_device": "XRT_DEVICE_HAND_INTERACTION",
"monado_device": "XRT_DEVICE_EXT_HAND_INTERACTION",
"extension": "XR_EXT_hand_interaction",
"subaction_paths": [
"/user/hand/left",
@ -117,7 +117,7 @@
"/interaction_profiles/ext/hand_interaction_ext": {
"title": "Ext Hand Interaction",
"type": "tracked_controller",
"monado_device": "XRT_DEVICE_HAND_INTERACTION",
"monado_device": "XRT_DEVICE_EXT_HAND_INTERACTION",
"extension": "XR_EXT_hand_interaction",
"extended_by": ["ext/palm_pose", "ext/hand_interaction_poses"],
"subaction_paths": [

View file

@ -643,6 +643,9 @@ enum xrt_device_name
XRT_DEVICE_HAND_TRACKER,
XRT_DEVICE_REALSENSE,
XRT_DEVICE_DEPTHAI,
//! XR_EXT_hand_interaction
XRT_DEVICE_EXT_HAND_INTERACTION
};
/*!

View file

@ -1,9 +1,10 @@
// Copyright 2018-2020, Collabora, Ltd.
// Copyright 2018-2020,2023 Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
* @brief Holds binding related functions.
* @author Jakob Bornecrantz <jakob@collabora.com>
* @author Korcan Hussein <korcan.hussein@collabora.com>
* @ingroup oxr_main
*/
@ -338,6 +339,7 @@ get_profile_for_device_name(struct oxr_logger *log,
case XRT_DEVICE_HAND_INTERACTION: FIND_PROFILE(msft_hand_interaction); return;
case XRT_DEVICE_EYE_GAZE_INTERACTION: FIND_PROFILE(ext_eye_gaze_interaction); return;
case XRT_DEVICE_OPPO_MR_CONTROLLER: FIND_PROFILE(oppo_mr_controller); return;
case XRT_DEVICE_EXT_HAND_INTERACTION: FIND_PROFILE(ext_hand_interaction); return;
// no interaction
default:

View file

@ -1,4 +1,4 @@
// Copyright 2020, Collabora, Ltd.
// Copyright 2020,2023 Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
@ -7,6 +7,7 @@
* @author Christoph Haag <christoph.haag@collabora.com>
* @author Daniel Willmott <web@dan-w.com>
* @author Moses Turner <moses@collabora.com>
* @author Korcan Hussein <korcan.hussein@collabora.com>
* @ingroup st_ovrd
*/
@ -637,6 +638,7 @@ public:
case XRT_DEVICE_HAND_TRACKER: break; // shouldn't happen
case XRT_DEVICE_GENERIC_HMD:
case XRT_DEVICE_VIVE_PRO: break; // no
case XRT_DEVICE_EXT_HAND_INTERACTION: break;
default: break;
}