Commit Graph
8460 Commits
Author SHA1 Message Date
Jan Schmidt d24bfcfbf5 d/wmr: Add LED models for constellation tracking 2026-03-25 17:50:33 +11:00
Jan Schmidt a96f295789 d/wmr: Start adding constellation tracking
Add a fast processing thread and do blob searching
2026-03-25 17:50:33 +11:00
Jan Schmidt 4d18710d9b d/wmr: Initial implementation of timesync protocol
First attempt at synchronising the controller LED blinking
with headset camera exposures.

Implement a controller tracking object that receives
camera frames and notifies the controllers so they
can synchronise LED blinking.
2026-03-25 17:50:33 +11:00
Jan Schmidt ac026bc6b9 d/wmr: Add defines for controller command IDs 2026-03-25 17:50:33 +11:00
Jan Schmidt 89b3cbdcb8 d/wmr: Fix a deadlock with tunnelled controllers.
Use a condition and busy count variable to avoid holding
the connection lock across calls to/from the controller
and HMD to allow bidirectional data passing without deadlocking.
2026-03-25 17:50:33 +11:00
Jan Schmidt 2d08b031d5 d/wmr: Connect controllers to HMDs for tracking+LED sync 2026-03-25 17:50:33 +11:00
Jan Schmidt 68636257c0 d/wmr: Rename sinks in the source component
Rename all the frame sinks that are SLAM specific
to make it clear that's what they are used for.
2026-03-25 17:50:33 +11:00
Jan Schmidt 11aa486655 d/wmr: Return native driver types from create calls
Instead of returning generic xrt_device from the hmd
and controller creation functions, return wmr_hmd
and wmr_base_controller, to enable connecting them
together for controller tracking.
2026-03-25 17:50:33 +11:00
Jan Schmidt 59a65d0fd3 d/wmr: Base controller IMU refactor and hw2mono
Move common IMU code into base controller.

Add hw2mono clock tracking for the device clock to local
clock mapping
2026-03-25 17:50:33 +11:00
Jan Schmidt bbbd22aa20 a/math: Tweak math_quat_ln() formulation
Negate the quaternion to have positive w for computing
the rotation as otherwise this formulation returns
weird results.

For example this quat:
	Q(0.200504,0.001968,0.065955,-0.977468) -> 2.782128,0.027307,0.915170

with this formulation:
	Q(0.200504,0.001968,0.065955,-0.977468) -> -0.202024,-0.001983,-0.066455
2026-03-25 17:50:33 +11:00
Beyley Cardellio a4f8d78377 doc: Document !2785
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2785>
2026-03-24 13:30:20 -04:00
Beyley Cardellio 08a8d7713b xrt: Add ContactGlove2 and Magnetra2
Currently does not include interaction profile, this will come later,
since I would like to write a proper specification first under a proper
MND prefix, and upstream it, since I have support to do so by the manufacturer.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2785>
2026-03-24 13:30:20 -04:00
Beyley Cardellio 885c08470e a/util,st/gui: Add u16_arr to u_var
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2785>
2026-03-24 13:30:20 -04:00
Beyley Cardellio 7d8d931b55 a/util: Add COBS decoder and encoder
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2785>
2026-03-24 13:30:19 -04:00
sdegrande 60c39c3361 t/common: Move the declaration of potentially unused variables.
Two variables are declared in the prolog of a function, but are only
used in an '#ifdef' portion of the function, and so are potentially
unused if that portion is not compiled.

This patch moves the declaration of those variables inside the
'#ifdef' portions.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2795>
2026-03-24 15:32:54 +00:00
sdegrande bbaa060d97 d/uvc: Print size_t values using a "%zu / %zd" format.
"%lu / %ld" is currently used, and clang warns, requesting to
use the format specifically defined for size_t values.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2795>
2026-03-24 15:32:54 +00:00
coolGi 0bc22639c5 ci: Add the flake to be detected for changes
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2796>
2026-03-25 03:41:35 +13:00
coolGi 36525ddb29 flake: Update inputs, and use the git version of libsurvive
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2796>
2026-03-25 02:03:39 +13:00
lightofmysoul 00ac28049e ipc/server: handle SIGTERM/SIGINT for graceful shutdown
Without handling these signals it is impossible for systemd to stop
the service normally. Also, this change allows to stop the service
in console by pressing CTRL+C.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2794>
2026-03-22 21:03:13 +00:00
Krzysztof Lesiak ef152c973b a/bindings: Fix CTS failures for MX Ink profile
Following tests were failing with the MX Ink interaction profile
enabled:
- xrSuggestInteractionProfileBindings_avail
- xrSuggestInteractionProfileBindings_avail_maintenance1
- xrSuggestInteractionProfileBindings_avail_1_1

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2779>
2026-03-20 14:01:29 +00:00
Jakob Bornecrantz 090f9688ae xrt: Change is_form_factor_supported to return xrt_result
Make all functions on xrt_device return a xft_result_t
so that ttings like IPC errors can be surfaced.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2792>
2026-03-20 09:20:24 +00:00
Beyley Cardellio 7ff112faf7 doc: Document the "HTC Config" headset stack
We have to do a lot of extra logic to make the Vive Pro 2 work, this is
only going to get more complex as more HTC headsets are supported, so
this document will help people understand where this complexity in
Monado's design comes from and why it has to exist.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2790>
2026-03-17 17:09:07 -04:00
Beyley Cardellio 41c5e5294d a/htc: Add debug var to force disable HTC distortion
On headsets like Vive Pro 2, we have fallback distortion algorithms that are easier to modify, so if someone is lens-modding the headset, this allows them to kill the HTC distortion and just change the LH distortion instead.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2782>
2026-03-17 15:17:43 -04:00
Beyley Cardellio da2d49aaae a/htc: Implement 3 more distortion algorithms
We *appear* to produce correct distortion for Vive Cosmos configs now.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2782>
2026-03-17 15:17:43 -04:00
Beyley Cardellio 2cd6fef734 a/htc: Make us resiliant to version 1.5 configs from Vive Cosmos
Not even the modern LibLensDistortion seems to handle these configs correctly? I think the original binary is just.. broken subtlely.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2782>
2026-03-17 15:17:43 -04:00
Beyley Cardellio c63acec197 a/htc,d/vp2: Move HTC config parsing to new a/htc module
a/vive is for Lighthouse specific data, and these notably are *not* lighthouse configs. These are the configuration files used across multiple HTC headsets

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2782>
2026-03-17 15:17:43 -04:00
coolGi 8b4dbf55cd a/vive: Use vive prefix for the public header structs
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2778>
2026-03-16 14:13:38 +00:00
coolGi d41847ba41 a/vive,d/survive: Support HMDs with static IPDs
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2778>
2026-03-16 14:13:38 +00:00
coolGi ab70aa5495 a/vive: Parse devices without depending on the variant
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2778>
2026-03-16 14:13:38 +00:00
Jonathan Steffan cb6a4481f0 fix: GCC 16 cstdint
std::uint8_t is not available without #include <cstdint> in GCC 16,
which breaks the enum class ExtensionType : std::uint8_t definition.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2786>
2026-03-14 17:05:19 -06:00
Beyley Cardellio aa8908d737 doc: Document !2781
Signed-off-by: Beyley Cardellio <ep1cm1n10n123@gmail.com>
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2781>
2026-03-11 15:22:59 -04:00
Beyley Cardellio ca76cd692f os/serial: Add serial abstraction with Linux implementation
Signed-off-by: Beyley Cardellio <ep1cm1n10n123@gmail.com>
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2781>
2026-03-11 15:22:59 -04:00
sdegrande 238efdcd16 c/main: On Windows, unregistred the window class using the class name
Currently, the call to UnregisterClass() is done with the ATOM returned
by the call to RegisterClass(). An ATOM is an 'unsigned short' and the
formal argument of UnregisterClass() is a 'const unsigned short *'.
This implies a cast and clang (v21) complains due to mismatch sizes.

To avoid the need to cast the ATOM, this patch calls the UnregisterClass()
function directly with a pointer to the class name. Given that the
ATOM is an index to a table storing the class name, the call is equivalent.

The potential lost of efficiency has no actual impact here, given
that this is only used when the window is closed.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2776>
2026-03-11 14:52:03 +00:00
sdegrande a216dd5424 xrt: Fix a warning reported by clang on a zero-initialization of a struct
Replace the initialization with XRT_STRUCT_INIT to use
zero-initialization for C code and value-initialization for C++ code.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2776>
2026-03-11 14:52:03 +00:00
sdegrande 7af3a274c4 ipc: Fix a warning reported by Mingw/clang on the printf format of a pid_t
On Mingw, a pid_t is a signed long long, while it is an int on other
os/environment.

This patch sets a PID_T_FORMAT, used when printing the value of a pid_t.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2776>
2026-03-11 14:52:03 +00:00
sdegrande 48032d33d0 ipc: Fix warnings reported by Mingw/clang, about wrong printf formats
Clang (21) complains about DWORD values (aka unsigned long) printed with
a "%d" format. A "%lu" is now used, as adviced by clang.

This format is expected to be supported by MSVC (checked with godbolt.org).

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2776>
2026-03-11 14:52:03 +00:00
sdegrande 0d5e83516f xrt: Remove an unused function, reported by clang 21 on Mingw64
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2776>
2026-03-11 14:52:03 +00:00
sdegrande d7cf1dd249 xrt: Fix warnings reported by clang 21 about unused variables
Remove those variables.
One of them is kept but marked as XRT_MAYBE_UNUSED, because it is used as
a return value.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2776>
2026-03-11 14:52:03 +00:00
Jakob Bornecrantz 8313c26059 st/oxr: Fix error return in xrSuggestInteractionProfileBindings
And make it clear that the path getting doesn't log errors.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2761>
2026-03-11 13:54:53 +00:00
Jakob Bornecrantz f441363622 st/oxr: Refactor out subaction structs, defines and functions to own file
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2761>
2026-03-11 13:54:53 +00:00
Jakob Bornecrantz 0eb454e68c st/oxr: Make it more clear we are failing to init attachments
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2761>
2026-03-11 13:54:53 +00:00
Jakob Bornecrantz eaf02fe12c st/oxr: Use action context and attached actions structs in attachments
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2761>
2026-03-11 13:54:53 +00:00
Jakob Bornecrantz 48a7ce8140 st/oxr: Add oxr_session_attached_actions
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2761>
2026-03-11 13:54:53 +00:00
Jakob Bornecrantz 6d503d082f st/oxr: Add oxr_session_action_context
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2761>
2026-03-11 13:54:52 +00:00
Beyley Cardellio 8ff0ba352d d/rift_sensor: Add function to get camera calibration
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2780>
2026-03-10 14:57:14 -04:00
Beyley Cardellio 359d2d499e d/rift_sensor: Handle destruction through a frame node
This ties in lifetimes a lot better with the d/uvc instances it holds.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2780>
2026-03-10 14:57:13 -04:00
Beyley Cardellio 3b03be5f2b d/rift_sensor: Enable exposure sync per-sensor and use rift_variant
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2780>
2026-03-10 14:57:13 -04:00
Beyley Cardellio ef0f7d0da2 d/uvc: Properly cancel and wait for transfers on stop
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2780>
2026-03-10 14:57:13 -04:00
Sapphire 16a030f4c6 d/steamvr_lh: add LH_STANDBY_ON_EXIT env var to power off devices on shutdown
Signed-off-by: Sapphire <imsapphire0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2777>
2026-03-07 10:44:45 -06:00
coolGi 5976596030 d/steamvr_lh: Replace the gamma lookup table with the correct mathematical function
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2773>
2026-03-06 15:52:42 +13:00