|
#define | DUMP_CONTROLLER_STATE 0 |
|
#define | DEG_TO_RAD(D) ((D)*M_PI / 180.) |
|
#define | SET_TOUCH_INPUT(d, NAME) ((d)->base.inputs[OCULUS_TOUCH_##NAME].name = XRT_INPUT_TOUCH_##NAME) |
|
#define | DEBUG_TOUCH_INPUT_BOOL(d, NAME, label) u_var_add_bool((d), &(d)->base.inputs[OCULUS_TOUCH_##NAME].value.boolean, label) |
|
#define | DEBUG_TOUCH_INPUT_F32(d, NAME, label) u_var_add_f32((d), &(d)->base.inputs[OCULUS_TOUCH_##NAME].value.vec1.x, label) |
|
#define | DEBUG_TOUCH_INPUT_VEC2(d, NAME, label1, label2) |
|
#define | READ_LE16(b) (b)[0] | ((b)[1]) << 8 |
|
#define | READ_LE32(b) (b)[0] | ((b)[1]) << 8 | ((b)[2]) << 16 | ((b)[3]) << 24 |
|
#define | READ_LEFLOAT32(b) (*(float *)(b)); |
|
|
enum | touch_controller_input_index {
OCULUS_TOUCH_X_CLICK = 0
, OCULUS_TOUCH_X_TOUCH
, OCULUS_TOUCH_Y_CLICK
, OCULUS_TOUCH_Y_TOUCH
,
OCULUS_TOUCH_MENU_CLICK
, OCULUS_TOUCH_A_CLICK = 0
, OCULUS_TOUCH_A_TOUCH
, OCULUS_TOUCH_B_CLICK
,
OCULUS_TOUCH_B_TOUCH
, OCULUS_TOUCH_SYSTEM_CLICK
, OCULUS_TOUCH_SQUEEZE_VALUE
, OCULUS_TOUCH_TRIGGER_TOUCH
,
OCULUS_TOUCH_TRIGGER_VALUE
, OCULUS_TOUCH_THUMBSTICK_CLICK
, OCULUS_TOUCH_THUMBSTICK_TOUCH
, OCULUS_TOUCH_THUMBSTICK
,
OCULUS_TOUCH_THUMBREST_TOUCH
, OCULUS_TOUCH_GRIP_POSE
, OCULUS_TOUCH_AIM_POSE
, INPUT_INDICES_LAST
} |
|
|
static void | handle_imu_update (struct rift_s_controller *ctrl, timepoint_ns local_ts, uint32_t imu_timestamp, const int16_t raw_accel[3], const int16_t raw_gyro[3]) |
|
bool | rift_s_controller_handle_report (struct rift_s_controller *ctrl, timepoint_ns local_ts, rift_s_controller_report_t *report) |
|
static void | ctrl_config_cb (bool success, uint8_t *response_bytes, int response_bytes_len, struct rift_s_controller *ctrl) |
|
static void | ctrl_json_cb (bool success, uint8_t *response_bytes, int response_bytes_len, struct rift_s_controller *ctrl) |
|
static void | rift_s_update_input_bool (struct rift_s_controller *ctrl, int index, int64_t when_ns, int val) |
|
static void | rift_s_update_input_analog (struct rift_s_controller *ctrl, int index, int64_t when_ns, float val) |
|
static void | rift_s_update_input_vec2 (struct rift_s_controller *ctrl, int index, int64_t when_ns, float x, float y) |
|
static xrt_result_t | rift_s_controller_update_inputs (struct xrt_device *xdev) |
|
static void | rift_s_controller_set_output (struct xrt_device *xdev, enum xrt_output_name name, const union xrt_output_value *value) |
|
static void | rift_s_controller_get_fusion_pose (struct rift_s_controller *ctrl, enum xrt_input_name name, int64_t at_timestamp_ns, struct xrt_space_relation *out_relation) |
|
static xrt_result_t | rift_s_controller_get_tracked_pose (struct xrt_device *xdev, enum xrt_input_name name, int64_t at_timestamp_ns, struct xrt_space_relation *out_relation) |
|
static void | rift_s_controller_destroy (struct xrt_device *xdev) |
|
struct rift_s_controller * | rift_s_controller_create (struct rift_s_system *sys, enum xrt_device_type device_type) |
|
void | rift_s_controller_update_configuration (struct rift_s_controller *ctrl, uint64_t device_id) |
|
Oculus Rift S Touch Controller driver.
Handles communication and calibration information for the Touch Controllers
Ported from OpenHMD
- Author
- Jan Schmidt jan@c.nosp@m.entr.nosp@m.icula.nosp@m.r.co.nosp@m.m