Monado OpenXR Runtime
Loading...
Searching...
No Matches
psvr2.h File Reference

PSVR2 HMD device. More...

#include <xrt/xrt_defines.h>
#include <xrt/xrt_byte_order.h>
#include "xrt/xrt_device.h"
#include "xrt/xrt_prober.h"
#include "xrt/xrt_tracking.h"
#include "os/os_threading.h"
#include "os/os_time.h"
#include "math/m_api.h"
#include "math/m_clock_tracking.h"
#include "math/m_mathinclude.h"
#include "math/m_relation_history.h"
#include "math/m_filter_one_euro.h"
#include "math/m_filter_fifo.h"
#include "util/u_misc.h"
#include "util/u_debug.h"
#include "util/u_device.h"
#include "util/u_distortion_mesh.h"
#include "util/u_frame.h"
#include "util/u_logging.h"
#include "util/u_sink.h"
#include "util/u_time.h"
#include "util/u_trace_marker.h"
#include "util/u_var.h"
#include "psvr2_protocol.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <assert.h>
#include <libusb.h>
Include dependency graph for psvr2.h:

Go to the source code of this file.

Data Structures

struct  imu_record
 
struct  psvr2_et_eye_data
 
struct  psvr2_et_combined_data
 
struct  psvr2_et_data
 
struct  psvr2_hmd
 PSVR2 HMD device. More...
 

Macros

#define NUM_CAM_XFERS   1
 
#define PSVR2_TRACE(p, ...)   U_LOG_XDEV_IFL_T(&p->base, p->log_level, __VA_ARGS__)
 
#define PSVR2_TRACE_HEX(p, data, data_size)   U_LOG_XDEV_IFL_T_HEX(&p->base, p->log_level, data, data_size)
 
#define PSVR2_DEBUG(p, ...)   U_LOG_XDEV_IFL_D(&p->base, p->log_level, __VA_ARGS__)
 
#define PSVR2_DEBUG_HEX(p, data, data_size)   U_LOG_XDEV_IFL_D_HEX(&p->base, p->log_level, data, data_size)
 
#define PSVR2_WARN(p, ...)   U_LOG_XDEV_IFL_W(&p->base, p->log_level, __VA_ARGS__)
 
#define PSVR2_ERROR(p, ...)   U_LOG_XDEV_IFL_E(&p->base, p->log_level, __VA_ARGS__)
 
#define TIMESTAMP_SAMPLES   100
 

Enumerations

enum  psvr2_hmd_input_name {
  PSVR2_HMD_INPUT_HEAD_POSE , PSVR2_HMD_INPUT_FUNCTION_BUTTON , PSVR2_HMD_INPUT_EYE_GAZE_POSE , PSVR2_HMD_INPUT_FB_FACE_TRACKING2_VISUAL ,
  PSVR2_HMD_INPUT_HTC_EYE_FACE_TRACKING , PSVR2_HMD_INPUT_ANDROID_FACE_TRACKING , PSVR2_HMD_INPUT_COUNT
}
 

Functions

static struct psvr2_hmdpsvr2_hmd (struct xrt_device *xdev)
 Casting helper function.
 
void psvr2_compute_distortion_asymmetric (float *calibration, struct xrt_uv_triplet *distCoords, int eEye, float fU, float fV)
 
bool psvr2_usb_xfer_continue (struct libusb_transfer *xfer, const char *type)
 
bool send_psvr2_control (struct psvr2_hmd *hmd, uint16_t report_id, uint8_t subcmd, uint8_t *pkt_data, uint32_t pkt_len)
 
void psvr2_free_et_data (struct psvr2_hmd *hmd)
 
int psvr2_start_gaze_tracking (struct psvr2_hmd *hmd)
 
xrt_result_t psvr2_get_face_tracking (struct xrt_device *xdev, enum xrt_input_name facial_expression_type, int64_t at_timestamp_ns, struct xrt_facial_expression_set *out_value)
 

Detailed Description

Function Documentation

◆ psvr2_hmd()

static struct psvr2_hmd * psvr2_hmd ( struct xrt_device xdev)
inlinestatic

Casting helper function.