monado/src/xrt/drivers/vive/vive_controller_interface.h
Christoph Haag d4e4a690db d/vive_controller: Add basic 3dof vive_controller_driver
v2: Add basic 3DOF Index Controller support

Only the "gen1" watchman usb protocol is supported (almost same as vive wand).
Note: Lighthouse v2 data is not properly ignored, the IMU data is only parsed correctly
when controller is not hit by lighthouse lasers.

Supported:
* trigger value
* trigger button
* trackpad x, y
* trackpad touch
* thumbstick x, y
* thumbstick click
* system click
* a click,
* b click

Not supported:
* trigger touch
* touchpad force
* thumbstick touch
* system touch
* a touch
* b touch
* grip squeeze
* finger tracking
2020-04-28 10:22:42 +00:00

44 lines
931 B
C

// Copyright 2020, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
* @brief Interface to @ref drv_vive
* @author Christoph Haag <christoph.haag@collabora.com>
* @author Ryan Pavlik <ryan.pavlik@collabora.com>
* @ingroup drv_vive
*/
#pragma once
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
/*!
* @ingroup drv_vive
*
* @brief Driver for the HTC Vive and Valve Index controllers.
*/
#define VALVE_VID 0x28de
#define VIVE_WATCHMAN_DONGLE 0x2101
#define VIVE_WATCHMAN_DONGLE_GEN2 0x2102
/*!
* Probing function for HTC Vive and Valve Index devices.
*
* @ingroup drv_vive
*/
int
vive_controller_found(struct xrt_prober *xp,
struct xrt_prober_device **devices,
size_t num_devices,
size_t index,
cJSON *attached_data,
struct xrt_device **out_xdevs);
#ifdef __cplusplus
}
#endif