Monado OpenXR Runtime
rift_s_firmware.c File Reference

Oculus Rift S firmware parsing. More...

#include <string.h>
#include <stdio.h>
#include "util/u_json.h"
#include "util/u_misc.h"
#include "rift_s.h"
#include "rift_s_firmware.h"
Include dependency graph for rift_s_firmware.c:

Macros

#define JSON_INT(a, b, c)   u_json_get_int(u_json_get(a, b), c)
 
#define JSON_FLOAT(a, b, c)   u_json_get_float(u_json_get(a, b), c)
 
#define JSON_DOUBLE(a, b, c)   u_json_get_double(u_json_get(a, b), c)
 
#define JSON_VEC3(a, b, c)   u_json_get_vec3_array(u_json_get(a, b), c)
 
#define JSON_MATRIX_3X3_ARRAY(a, b, c)   u_json_get_float_array(u_json_get(a, b), c.v, 9)
 
#define JSON_MATRIX_4x4_ARRAY(a, b, c)   u_json_get_float_array(u_json_get(a, b), c.v, 16)
 

Functions

int rift_s_parse_proximity_threshold (char *json_string, int *proximity_threshold)
 
static bool check_file_format_version (cJSON *json_root, float expected_version, float *version_number)
 
int rift_s_parse_imu_calibration (char *json_string, struct rift_s_imu_calibration *c)
 
static bool rift_s_config_parse_camera_config (struct rift_s_camera_calibration *cam_config, int camera_id, const cJSON *camera_json)
 
int rift_s_parse_camera_calibration_block (char *json_string, struct rift_s_camera_calibration_block *c)
 
static bool json_read_led_point (const cJSON *led_model, struct rift_s_led *led, int n)
 
static bool json_read_lensing_model (const cJSON *lensing_model, struct rift_s_lensing_model *model, int n)
 
int rift_s_controller_parse_imu_calibration (char *json_string, struct rift_s_controller_imu_calibration *c)
 
void rift_s_controller_free_imu_calibration (struct rift_s_controller_imu_calibration *c)
 

Detailed Description

Oculus Rift S firmware parsing.

Functions for parsing JSON configuration from the HMD and Touch Controller firmware.

Author
Jan Schmidt jan@c.nosp@m.entr.nosp@m.icula.nosp@m.r.co.nosp@m.m