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.
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.
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.
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
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>
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>
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>
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>
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>
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>
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>