vive: Bug fixes, JSON and probing cleanup.
This set of patches resolves issues I have encountered in the Vive driver and refactors separation between controller and headset code. Furthermore this patch set extends u_json
and applies it's usage to all of the vive driver. Avoiding dynamic string allocation which was later not freed and unifying config functionality in a vive_config
module, avoiding duplication between controller and headset code.
- The Vive Pro didn't work for me as it crashes due to missing json entries.
- The controller driver didn't initialize debug early enough, so the first messages were not printed.
- The controller driver incorrectly tried to parse json vec3 arrays as objects with x,y,z members.
- The configuration handling is now fully isolated in
vive_config
, sharing code between controller and headset. - The controller now exposes a constructor, which is separated from the prober code. The prober code now lives in
vive_proper
, as the rest of the driver.
This branch was tested on Valve Index, Vive Gen 1, Vive Pro using xrgears and openxr-simple-example. Controllers seemed to work as well and the config parsing looked right to me. More testing wouldn't hurt though. @haagch should take a look at it.