The open source OpenXR runtime
0
fork

Configure Feed

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

a/bindings + d/blubur_s1 + st/oxr: Implement MNDX_blubur_s1

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2590>

authored by

Beyley Cardellio and committed by
Marge Bot
f041a12d 87b2e9cc

+76 -3
+1
scripts/generate_oxr_ext_support.py
··· 103 103 ['XR_EXTX_overlay', 'XRT_FEATURE_OPENXR_OVERLAY'], 104 104 ['XR_HTCX_vive_tracker_interaction', 'ALWAYS_DISABLED'], 105 105 ['XR_MNDX_ball_on_a_stick_controller', 'XRT_FEATURE_OPENXR_INTERACTION_MNDX'], 106 + ['XR_MNDX_blubur_s1', 'XRT_FEATURE_OPENXR_INTERACTION_MNDX'], 106 107 ['XR_MNDX_oculus_remote', 'XRT_FEATURE_OPENXR_INTERACTION_MNDX'], 107 108 ['XR_MNDX_egl_enable', 'XR_USE_PLATFORM_EGL'], 108 109 ['XR_MNDX_force_feedback_curl', 'XRT_FEATURE_OPENXR_FORCE_FEEDBACK_CURL'],
+26
src/external/openxr_includes/openxr/XR_MNDX_blubur_s1.h
··· 1 + // Copyright 2025, Beyley Cardellio 2 + // SPDX-License-Identifier: BSL-1.0 3 + /*! 4 + * @file 5 + * @brief Preview header for XR_MNDX_blubur_s1 extension 6 + * @author Beyley Cardellio <ep1cm1n10n123@gmail.com> 7 + * @ingroup external_openxr 8 + */ 9 + #ifndef XR_MNDX_BLUBUR_S1_H 10 + #define XR_MNDX_BLUBUR_S1_H 1 11 + 12 + #include <openxr/openxr.h> 13 + 14 + #ifdef __cplusplus 15 + extern "C" { 16 + #endif 17 + 18 + #define XR_MNDX_blubur_s1 1 19 + #define XR_MNDX_blubur_s1_SPEC_VERSION 1 20 + #define XR_MNDX_BLUBUR_S1_EXTENSION_NAME "XR_MNDX_blubur_s1" 21 + 22 + #ifdef __cplusplus 23 + } 24 + #endif 25 + 26 + #endif
+20
src/xrt/auxiliary/bindings/bindings.json
··· 3741 3741 } 3742 3742 } 3743 3743 } 3744 + }, 3745 + 3746 + "/interaction_profiles/mndx/blubur_s1_mndx": { 3747 + "title": "Blubur S1", 3748 + "type": "tracked_hmd", 3749 + "monado_device": "XRT_DEVICE_BLUBUR_S1", 3750 + "extended_by": [], 3751 + "subaction_paths": [ 3752 + "/user/head" 3753 + ], 3754 + "subpaths": { 3755 + "/input/menu": { 3756 + "type": "button", 3757 + "localized_name": "Menu", 3758 + "components": ["click"], 3759 + "monado_bindings": { 3760 + "click": "XRT_INPUT_BLUBUR_S1_MENU_CLICK" 3761 + } 3762 + } 3763 + } 3744 3764 } 3745 3765 3746 3766 }
+12 -2
src/xrt/drivers/blubur_s1/blubur_s1_hmd.c
··· 109 109 static xrt_result_t 110 110 blubur_s1_hmd_update_inputs(struct xrt_device *xdev) 111 111 { 112 + struct blubur_s1_hmd *hmd = blubur_s1_hmd(xdev); 113 + 114 + os_mutex_lock(&hmd->input_mutex); 115 + bool menu = hmd->input.status & BLUBUR_S1_STATUS_BUTTON; 116 + os_mutex_unlock(&hmd->input_mutex); 117 + 118 + xdev->inputs[1].value = (union xrt_input_value){.boolean = menu}; 119 + xdev->inputs[1].timestamp = os_monotonic_get_ns(); 120 + 112 121 return XRT_SUCCESS; 113 122 } 114 123 ··· 496 505 int ret; 497 506 498 507 struct blubur_s1_hmd *hmd = 499 - U_DEVICE_ALLOCATE(struct blubur_s1_hmd, U_DEVICE_ALLOC_HMD | U_DEVICE_ALLOC_TRACKING_NONE, 1, 0); 508 + U_DEVICE_ALLOCATE(struct blubur_s1_hmd, U_DEVICE_ALLOC_HMD | U_DEVICE_ALLOC_TRACKING_NONE, 2, 0); 500 509 if (hmd == NULL) { 501 510 return NULL; 502 511 } ··· 512 521 } 513 522 514 523 hmd->base.destroy = blubur_s1_hmd_destroy; 515 - hmd->base.name = XRT_DEVICE_GENERIC_HMD; 524 + hmd->base.name = XRT_DEVICE_BLUBUR_S1; 516 525 hmd->base.device_type = XRT_DEVICE_TYPE_HMD; 517 526 518 527 hmd->base.hmd->screens[0].w_pixels = PANEL_WIDTH; ··· 570 579 hmd->base.supported.presence = true; 571 580 572 581 hmd->base.inputs[0].name = XRT_INPUT_GENERIC_HEAD_POSE; 582 + hmd->base.inputs[1].name = XRT_INPUT_BLUBUR_S1_MENU_CLICK; 573 583 574 584 hmd->base.update_inputs = blubur_s1_hmd_update_inputs; 575 585 hmd->base.get_tracked_pose = blubur_s1_hmd_get_tracked_pose;
+4 -1
src/xrt/include/xrt/xrt_defines.h
··· 742 742 XRT_DEVICE_PSSENSE, 743 743 XRT_DEVICE_HYDRA, 744 744 XRT_DEVICE_RIFT_REMOTE, 745 + XRT_DEVICE_BLUBUR_S1, 745 746 746 747 // Other misc stuff. 747 748 XRT_DEVICE_HAND_TRACKER, ··· 1298 1299 _(XRT_INPUT_RIFT_REMOTE_DPAD_DOWN_CLICK , XRT_INPUT_NAME(0x0F05, BOOLEAN)) \ 1299 1300 _(XRT_INPUT_RIFT_REMOTE_DPAD_RIGHT_CLICK , XRT_INPUT_NAME(0x0F06, BOOLEAN)) \ 1300 1301 _(XRT_INPUT_RIFT_REMOTE_DPAD_UP_CLICK , XRT_INPUT_NAME(0x0F07, BOOLEAN)) \ 1301 - _(XRT_INPUT_RIFT_REMOTE_DPAD_LEFT_CLICK , XRT_INPUT_NAME(0x0F08, BOOLEAN)) 1302 + _(XRT_INPUT_RIFT_REMOTE_DPAD_LEFT_CLICK , XRT_INPUT_NAME(0x0F08, BOOLEAN)) \ 1303 + \ 1304 + _(XRT_INPUT_BLUBUR_S1_MENU_CLICK , XRT_INPUT_NAME(0x1000, BOOLEAN)) 1302 1305 1303 1306 // clang-format on 1304 1307
+1
src/xrt/include/xrt/xrt_openxr_includes.h
··· 69 69 #include "openxr/XR_MNDX_system_buttons.h" 70 70 #include "openxr/XR_MNDX_ball_on_a_stick_controller.h" 71 71 #include "openxr/XR_MNDX_oculus_remote.h" 72 + #include "openxr/XR_MNDX_blubur_s1.h"
+12
src/xrt/state_trackers/oxr/oxr_extension_support.h
··· 775 775 776 776 777 777 /* 778 + * XR_MNDX_blubur_s1 779 + */ 780 + #if defined(XR_MNDX_blubur_s1) && defined(XRT_FEATURE_OPENXR_INTERACTION_MNDX) 781 + #define OXR_HAVE_MNDX_blubur_s1 782 + #define OXR_EXTENSION_SUPPORT_MNDX_blubur_s1(_) _(MNDX_blubur_s1, MNDX_BLUBUR_S1) 783 + #else 784 + #define OXR_EXTENSION_SUPPORT_MNDX_blubur_s1(_) 785 + #endif 786 + 787 + 788 + /* 778 789 * XR_MNDX_oculus_remote 779 790 */ 780 791 #if defined(XR_MNDX_oculus_remote) && defined(XRT_FEATURE_OPENXR_INTERACTION_MNDX) ··· 929 940 OXR_EXTENSION_SUPPORT_EXTX_overlay(_) \ 930 941 OXR_EXTENSION_SUPPORT_HTCX_vive_tracker_interaction(_) \ 931 942 OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_) \ 943 + OXR_EXTENSION_SUPPORT_MNDX_blubur_s1(_) \ 932 944 OXR_EXTENSION_SUPPORT_MNDX_oculus_remote(_) \ 933 945 OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_) \ 934 946 OXR_EXTENSION_SUPPORT_MNDX_force_feedback_curl(_) \