16#include <hidapi/hidapi.h>
19#define PIMAX_P2_MODEL_NAME_LENGTH 32
61 const struct xrt_vec3 *default_eye_relation,
106 uint32_t pixels_width;
107 uint32_t pixels_height;
108 uint32_t refresh_rate;
109 float nominal_frame_interval_ns;
113typedef void (*pimax_p2_display_get_props_func_t)(
struct pimax_p2_device *dev,
115typedef void (*pimax_p2_init_display_func_t)(
struct pimax_p2_device *dev);
120 pimax_p2_display_get_props_func_t get_display_properties;
121 pimax_p2_init_display_func_t init_display;
126 const wchar_t product_name[PIMAX_P2_MODEL_NAME_LENGTH];
127 const char display_name[PIMAX_P2_MODEL_NAME_LENGTH];
128 const char *default_mesh_name;
154 const char *default_mesh_name;
156 char display_name[XRT_DEVICE_NAME_LEN];
177 PIMAX_P2_INIT_STATE_HID_MUTEX = 1 << 0,
179 PIMAX_P2_INIT_STATE_HID_THREAD = 1 << 1,
180 PIMAX_P2_INIT_STATE_HID_THREAD_RUNNING = 1 << 2,
185 uint32_t polls_since_last_keepalive;
187 bool always_update_distortion;
xrt_result_t pimax_p2_set_brightness(struct pimax_p2_device *dev, float brightness, bool relative)
Set backlight brightness from 0 to 1.
Definition pimax_p2.c:931
bool pimax_p2_init(struct pimax_p2_device **pdev)
Initializes the Pimax HID device, enables the displays, and allocates and populates pdev with data.
Definition pimax_p2.c:1077
xrt_result_t pimax_p2_get_brightness(struct pimax_p2_device *dev, float *out_brightness)
Get backlight brightness from 0 to 1.
Definition pimax_p2.c:921
xrt_result_t pimax_p2_compute_distortion_from_mesh(struct pimax_p2_device *dev, uint32_t view, float u, float v, struct xrt_uv_triplet *out_result)
Compute distortion, using the mesh loaded by init.
Definition pimax_p2.c:949
void pimax_p2_destroy(struct pimax_p2_device *dev)
Clean up a pimax_p2_device.
Definition pimax_p2.c:1111
xrt_result_t pimax_p2_get_view_poses(struct pimax_p2_device *dev, const struct xrt_vec3 *default_eye_relation, struct xrt_hmd_parts *hmd, uint32_t view_count, struct xrt_fov *out_fovs, struct xrt_pose *out_poses)
Like xrt_device->get_view_poses, but does not fill in the head relation.
Definition pimax_p2.c:845
bool pimax_p2_setup_hmd(struct pimax_p2_device *pdev, struct xrt_hmd_parts *hmd)
Fills the xrt_hmd_parts with data.
Definition pimax_p2.c:1139
enum xrt_result xrt_result_t
Result type used across Monado.
Wrapper around OS threading native functions.
A wrapper around a native mutex.
Definition os_threading.h:69
A wrapper around a native thread.
Definition os_threading.h:298
Definition pimax_p2.h:163
Definition pimax_p2.h:152
Definition pimax_p2.h:104
Definition pimax_p2.h:146
Definition pimax_p2.h:140
Definition pimax_p2.h:125
Definition pimax_p2.h:119
Definition pimax_p2.h:133
Draggable single precision float information.
Definition u_var.h:134
Describes a projection matrix fov.
Definition xrt_defines.h:542
All of the device components that deals with interfacing to a users head.
Definition xrt_device.h:165
A pose composed of a position and orientation.
Definition xrt_defines.h:522
Represents a uv triplet for distortion, basically just three xrt_vec2.
Definition xrt_defines.h:300
A 2 element vector with single floats.
Definition xrt_defines.h:279
A 3 element vector with single floats.
Definition xrt_defines.h:310
Header defining an xrt display or controller device.