From 76c18bfdc7558b7e3a8f4d8423709c543cce9cd5 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 3 Dec 2021 04:20:20 +1100 Subject: [PATCH] d/wmr: Rename wmr_config_parse to wmr_hmd_config_parse() --- src/xrt/drivers/wmr/wmr_config.c | 6 +++--- src/xrt/drivers/wmr/wmr_config.h | 2 +- src/xrt/drivers/wmr/wmr_hmd.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xrt/drivers/wmr/wmr_config.c b/src/xrt/drivers/wmr/wmr_config.c index 09f07030a..c0814091f 100644 --- a/src/xrt/drivers/wmr/wmr_config.c +++ b/src/xrt/drivers/wmr/wmr_config.c @@ -29,7 +29,7 @@ #define JSON_STRING(a, b, c) u_json_get_string_into_array(u_json_get(a, b), c, sizeof(c)) static void -wmr_config_init_defaults(struct wmr_hmd_config *c) +wmr_hmd_config_init_defaults(struct wmr_hmd_config *c) { memset(c, 0, sizeof(struct wmr_hmd_config)); @@ -383,9 +383,9 @@ wmr_config_parse_calibration(struct wmr_hmd_config *c, cJSON *calib_info, enum u bool -wmr_config_parse(struct wmr_hmd_config *c, char *json_string, enum u_logging_level log_level) +wmr_hmd_config_parse(struct wmr_hmd_config *c, char *json_string, enum u_logging_level log_level) { - wmr_config_init_defaults(c); + wmr_hmd_config_init_defaults(c); cJSON *json_root = cJSON_Parse(json_string); if (!cJSON_IsObject(json_root)) { diff --git a/src/xrt/drivers/wmr/wmr_config.h b/src/xrt/drivers/wmr/wmr_config.h index afec5a9d4..5be16ee29 100644 --- a/src/xrt/drivers/wmr/wmr_config.h +++ b/src/xrt/drivers/wmr/wmr_config.h @@ -119,7 +119,7 @@ struct wmr_hmd_config }; bool -wmr_config_parse(struct wmr_hmd_config *c, char *json_string, enum u_logging_level log_level); +wmr_hmd_config_parse(struct wmr_hmd_config *c, char *json_string, enum u_logging_level log_level); struct wmr_bt_controller_config diff --git a/src/xrt/drivers/wmr/wmr_hmd.c b/src/xrt/drivers/wmr/wmr_hmd.c index 94154c948..16b596b47 100644 --- a/src/xrt/drivers/wmr/wmr_hmd.c +++ b/src/xrt/drivers/wmr/wmr_hmd.c @@ -645,7 +645,7 @@ wmr_read_config(struct wmr_hmd *wh) config_json_block[i] ^= wmr_config_key[i % sizeof(wmr_config_key)]; } - if (!wmr_config_parse(&wh->config, (char *)config_json_block, wh->log_level)) { + if (!wmr_hmd_config_parse(&wh->config, (char *)config_json_block, wh->log_level)) { free(data); return -1; }