Raw Vive HID/USB parser
OTHER License
You probably want libsurvive
libvive is a library for reading USB data from:
VIVE controllers
VIVE headset
Lighthouse
Dependencies libvive: hidapi
Dependencies vivegui: glfw3, GLU, GLEW
$ make install
int main(int argc, char** argv) {
struct vive_state vive;
struct vive_controller *controller;
int i;
if (vive_open(&vive)) {
printf("Could not read from vive controllers\n");
return 1;
}
for (i = 0; i < vive->num_controllers; ++i) {
controller = &vive->controllers[i];
printf("smoothed gyro pitch/roll: %f %f\n",
controller->pitch_smooth,
controller->roll_smooth);
}
vive_close(&vive);