|
| static uint32_t | rift_custom_pattern_sequence_repeat (enum rift_custom_pattern_state state) |
| | Repeats a 2-bit LED state across all RIFT_CUSTOM_PATTERN_SEQUENCE_LENGTH phases of a custom pattern sequence.
|
| |
|
static int | rift_sensor_thread_tick (struct rift_hmd *hmd) |
| |
|
static void * | rift_sensor_thread (void *ptr) |
| |
|
static int | rift_usb_thread_radio_tick (struct rift_hmd *hmd) |
| |
|
static void * | rift_radio_thread (void *ptr) |
| |
|
static int | rift_read_led_model (struct rift_hmd *hmd) |
| |
| static int | rift_upload_back_strap_disable_pattern (struct rift_hmd *hmd) |
| | Uploads a custom pattern that holds every LED high except the back strap LEDs, which are held off, then drops the back strap LEDs from rift_hmd::led_model so the constellation tracker never tries to match blobs against LEDs that are physically dark.
|
| |
|
static void | get_raw_pose (struct rift_hmd *hmd, timepoint_ns when_ns, struct xrt_relation_chain *xrc) |
| |
|
static void | rift_fill_in_default_distortions (struct rift_hmd *hmd) |
| |
|
static void | rift_fill_in_distortion_inputs (struct rift_hmd *hmd) |
| |
|
static void | rift_hmd_destroy (struct xrt_device *xdev) |
| |
|
static xrt_result_t | rift_hmd_update_inputs (struct xrt_device *xdev) |
| |
|
static xrt_result_t | rift_hmd_get_tracked_pose (struct xrt_device *xdev, enum xrt_input_name name, int64_t at_timestamp_ns, struct xrt_space_relation *out_relation) |
| |
|
static xrt_result_t | rift_hmd_get_view_poses (struct xrt_device *xdev, const struct xrt_vec3 *default_eye_relation, int64_t at_timestamp_ns, enum xrt_view_type view_type, uint32_t view_count, struct xrt_space_relation *out_head_relation, struct xrt_fov *out_fovs, struct xrt_pose *out_poses) |
| |
|
static xrt_result_t | rift_hmd_get_visibility_mask (struct xrt_device *xdev, enum xrt_visibility_mask_type type, uint32_t view_index, struct xrt_visibility_mask **out_mask) |
| |
|
static xrt_result_t | rift_hmd_compute_distortion (struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *out_result) |
| |
| static void | rift_display_get_scanout (const struct rift_display_report *display, enum xrt_panel_refresh_type *out_refresh_type, enum xrt_scanout_direction *out_scanout_direction) |
| | How the panel exposes the image, from the display report.
|
| |
|
static xrt_result_t | rift_hmd_get_compositor_info (struct xrt_device *xdev, const struct xrt_device_compositor_mode *mode, struct xrt_device_compositor_info *out_info) |
| |
|
static void | rift_hmd_constellation_device_push_constellation_tracker_sample (struct t_constellation_tracker_device *connection, struct t_constellation_tracker_sample *sample) |
| |
|
static void | rift_frame_node_break_apart (struct xrt_frame_node *node) |
| |
|
static void | rift_frame_node_destroy (struct xrt_frame_node *node) |
| |
|
static const char * | variant_name (enum rift_variant variant) |
| |
| int | rift_devices_create (struct h_hid_device *hmd_dev, struct h_hid_device *radio_dev, enum rift_variant variant, const char *serial_number, struct xrt_frame_context *xfctx, struct rift_hmd **out_hmd, struct xrt_device **out_xdevs) |
| | Creates Rift HMD and related devices.
|
| |
|
bool | rift_get_radio_id (struct rift_hmd *hmd, uint8_t out_radio_id[5]) |
| |
| bool | rift_hmd_frame_timestamp_callback (void *user_data, timepoint_ns *out_timestamp, uint64_t *out_sequence_id, timepoint_ns frame_start_ns, uint32_t pts) |
| | Timestamps a camera frame with the time of the exposure that produced it, which is taken to be the exposure whose IN report arrived within half a frame interval of one whole frame interval before the frame's first packet.
|
| |
|
int | rift_add_to_constellation_tracker (struct rift_hmd *hmd, struct t_constellation_tracker *tracker) |
| |
| struct t_timing_event_source * | rift_hmd_get_timing_event_source (struct rift_hmd *hmd) |
| | Gets the HMD's timing event source.
|
| |
Creates Rift HMD and related devices.
- Parameters
-
| hmd_dev | The HID device for the HMD. |
| radio_dev | The HID device for the radio, if present (CV1 only). |
| variant | The Rift variant (DK2 or CV1). |
| serial_number | The serial number of the device. |
| xfctx | The frame context to use for the timing source functions. Non-optional. |
| out_hmd | Output pointer for the created rift_hmd struct. |
| out_xdevs | Output array for the created xrt_device pointers. The array must have space for at least 4 devices (HMD, left touch, right touch, remote). |
- Returns
- The number of devices created, or a negative value on error.
References xrt_hmd_parts::blend_modes, xrt_device::compute_distortion, rift_hmd::default_icd, xrt_device::destroy, rift_hmd::device_mutex, rift_hmd::display, xrt_view::display, xrt_hmd_parts::distortion, xrt_hmd_parts::fov, xrt_device::get_compositor_info, xrt_device::get_tracked_pose, xrt_device::get_view_poses, xrt_device::get_visibility_mask, xrt_device::hmd, xrt_device::inputs, m_clock_windowed_skew_tracker_alloc(), xrt_hmd_parts::models, xrt_device::name, xrt_hmd_parts::nominal_frame_interval_ns, os_nanosleep(), xrt_hmd_parts::preferred, t_constellation_tracker_device::push_constellation_tracker_sample, rift_hmd::radio_state, rift_upload_back_strap_disable_pattern(), xrt_view::rot, xrt_hmd_parts::screens, xrt_device::serial, xrt_device::str, xrt_device::supported, time_s_to_ns(), u_distortion_mesh_fill_in_compute(), U_LOG_CHK_ONLY_PRINT, u_truncate_snprintf(), u_var_add_root(), U_ZERO, xrt_device::update_inputs, xrt_view::viewport, xrt_hmd_parts::views, and XRT_INPUT_GENERIC_HEAD_POSE.
How the panel exposes the image, from the display report.
The DK2 firmware derives the read only mode from RIFT_DISPLAY_USE_ROLLING, including the direction, and forces RIFT_DISPLAY_REVERSE_ROLLING on, so the mode is used as is. The CV1 instead keeps reporting global after being switched to rolling, so then the flags are all there is to go on.
Note the DK2's "global" mode is really a rolling band at full persistence.
- Note
- The headset's spud file may state this is non-global shutter on some units, but we don't read those
References rift_hmd::display, XRT_PANEL_REFRESH_TYPE_GLOBAL, and XRT_PANEL_REFRESH_TYPE_ROLLING.
| static int rift_upload_back_strap_disable_pattern |
( |
struct rift_hmd * |
hmd | ) |
|
|
static |