#include <libusb-1.0/libusb.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
Go to the source code of this file.
|
enum | Data {
DATA_IMU,
DATA_LIGHT_7,
DATA_LIGHT_9,
DATA_BUTTONS,
DATA_WATCHMAN
} |
|
enum | Event {
EVENT_TRIGGER = (1<<8),
EVENT_GRIP = (1<<10),
EVENT_MENU = (1<<20),
EVENT_PAD_CLICK = (1<<26),
EVENT_PAD_TOUCH = (1<<28)
} |
|
enum | state_t { PREAMBLE,
LENGTH,
PAYLOAD,
CHECKSUM
} |
|
enum | Axis { MOTOR_AXIS0,
MOTOR_AXIS1,
MAX_NUM_MOTORS
} |
|
◆ DEBUG_PRINTF
#define DEBUG_PRINTF |
( |
|
f_, |
|
|
|
... |
|
) |
| |
◆ DEFAULT_ACC_SCALE
#define DEFAULT_ACC_SCALE (float)(9.80665/4096.0) |
◆ DEFAULT_GYR_SCALE
#define DEFAULT_GYR_SCALE (float)((1./32.768)*(3.14159/180.)); |
◆ MAX_ENDPOINTS
◆ MAX_NUM_LIGHTHOUSES
#define MAX_NUM_LIGHTHOUSES 2 |
◆ MAX_NUM_SENSORS
#define MAX_NUM_SENSORS 32 |
◆ MAX_NUM_TRACKERS
#define MAX_NUM_TRACKERS 128 |
◆ MAX_PACKET_LEN
#define MAX_PACKET_LEN 64 |
◆ MAX_SERIAL_LENGTH
#define MAX_SERIAL_LENGTH 32 |
◆ PREAMBLE_LENGTH
#define PREAMBLE_LENGTH 17 |
◆ USB_ENDPOINT_V1_BUTTONS
#define USB_ENDPOINT_V1_BUTTONS 0x83 |
◆ USB_ENDPOINT_V1_GENERAL
#define USB_ENDPOINT_V1_GENERAL 0x81 |
◆ USB_ENDPOINT_V1_LIGHT
#define USB_ENDPOINT_V1_LIGHT 0x82 |
◆ USB_ENDPOINT_V2_BUTTONS
#define USB_ENDPOINT_V2_BUTTONS 0x84 |
◆ USB_ENDPOINT_V2_GENERAL
#define USB_ENDPOINT_V2_GENERAL 0x81 |
◆ USB_ENDPOINT_V2_LIGHT
#define USB_ENDPOINT_V2_LIGHT 0x83 |
◆ USB_ENDPOINT_WATCHMAN
#define USB_ENDPOINT_WATCHMAN 0x81 |
◆ USB_INT_BUFF_LENGTH
#define USB_INT_BUFF_LENGTH 64 |
◆ USB_PROD_CONTROLLER_V1
#define USB_PROD_CONTROLLER_V1 0x2012 |
◆ USB_PROD_TRACKER_V1
#define USB_PROD_TRACKER_V1 0x2022 |
◆ USB_PROD_TRACKER_V2
#define USB_PROD_TRACKER_V2 0x2300 |
◆ USB_PROD_WATCHMAN
#define USB_PROD_WATCHMAN 0x2101 |
◆ USB_VEND_HTC
#define USB_VEND_HTC 0x28de |
◆ axis_t
◆ button_cb_t
◆ button_t
◆ calibration_t
◆ data_t
◆ driver_t
◆ endpoint_t
◆ event_t
◆ general_t
◆ global_data_t
◆ imu_cb_t
typedef void(* imu_cb_t) (tracker_t const *tracker, imu_t const *measurement) |
◆ imu_t
◆ light_cb_t
typedef void(* light_cb_t) (tracker_t const *tracker, uint8_t lh, uint8_t axis, uint32_t synctime, uint16_t num_sensors, light_t const *measurement) |
◆ light_t
◆ lightcap_data_t
◆ lightcap_sweep_data_t
◆ lighthouse_cb_t
typedef void(* lighthouse_cb_t) (lighthouse_t const *lighthouse) |
◆ lighthouse_t
◆ motor_t
◆ ootx_t
◆ per_sweep_data_t
◆ tracker_cb_t
typedef void(* tracker_cb_t) (tracker_t const *tracker) |
◆ tracker_t
◆ Axis
Enumerator |
---|
MOTOR_AXIS0 | |
MOTOR_AXIS1 | |
MAX_NUM_MOTORS | |
◆ Data
Enumerator |
---|
DATA_IMU | |
DATA_LIGHT_7 | |
DATA_LIGHT_9 | |
DATA_BUTTONS | |
DATA_WATCHMAN | |
◆ Event
Enumerator |
---|
EVENT_TRIGGER | |
EVENT_GRIP | |
EVENT_MENU | |
EVENT_PAD_CLICK | |
EVENT_PAD_TOUCH | |
◆ state_t
Enumerator |
---|
PREAMBLE | |
LENGTH | |
PAYLOAD | |
CHECKSUM | |
◆ vive_general()
◆ vive_init()
◆ vive_install_button_fn()
◆ vive_install_imu_fn()
◆ vive_install_light_fn()
◆ vive_install_lighthouse_fn()
◆ vive_install_tracker_fn()
◆ vive_kill()
◆ vive_lighthouse()
◆ vive_poll()
◆ vive_tracker()