Implement support for SteamVR's Lighthouse driver (on Linux).
Only tested/works with the OG Vive and Vive wands, but adding new
device support should be simple.
Had to use REGEX because for some reason the ignore word list isn't case
sensitive, the docummention says it is. Added inout there to show how to
add more words.
While in the Monado debug GUI the squeeze trigger is detected fine and
it is also listed in the SteamVR "Test Controller" page, pushing the
squeeze trigger would not be detected in SteamVR.
Fixing this by not just populating the xrt_inputs squeeze click but also
the squeeze value.
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
By using an extra, final entry in the according inputs enum instead
of using a hard coded number it should be slightly safer and easier
to verify that the to be allocated inputs array is of correct size.
No functional change.
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
SteamVR requires the serial number to be set. Otherwise after creating
the controller it will fail to activate it.
Before:
...
monado: Creating Controller WMR Left Controller
monado: Using Monado Controller profile
monado: Render model based on Monado: locator_one_sided
monado: get controller serial number:
Driver 'monado' attempted to add tracked device with no serial number
monado: Added left Controller: WMR Left Controller
monado: Creating Controller WMR Right Controller
monado: Using Monado Controller profile
monado: Render model based on Monado: locator_one_sided
monado: get controller serial number:
Driver 'monado' attempted to add tracked device with no serial number
monado: Added right Controller: WMR Right Controller
...
After:
monado: Creating Controller WMR Left Controller
monado: Using Monado Controller profile
monado: Render model based on Monado: locator_one_sided
monado: get controller serial number: Left Controller
Driver 'monado' started activation of tracked device with serial number 'Left Controller'
monado: Added left Controller: WMR Left Controller
monado: Creating Controller WMR Right Controller
monado: Using Monado Controller profile
monado: Render model based on Monado: locator_one_sided
monado: get controller serial number: Right Controller
Driver 'monado' started activation of tracked device with serial number 'Right Controller'
monado: Added right Controller: WMR Right Controller
With this change the HP Reverb G2 controller is recognized and activated
fine in SteamVR for me. "Active Controller" nows says:
"monado_hp_mixed_reality_controller". The SteamVR controller test page
now works and recognizes button presses. The controllers can also
(kind of) be used in the home environment.
Several issues still exist to be fully useable:
* middle finger button not recognized in the SteamVR test page
(all other buttons seem to work)
* high gyro drift
* no positional tracking
The serial is set to "Left Controller" and "Right Controller" for now,
just like for the Rift S controller. This should probably be updated to
a proper serial number once read_controller_config() can parse it from
the firmware.
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>