mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-04 06:06:17 +00:00
u/vive: Be more verbose if we fail to parse model_[name|number]
This commit is contained in:
parent
12baf0ada3
commit
e21e28c455
|
@ -397,8 +397,10 @@ vive_config_parse(struct vive_config *d, char *json_string, enum u_logging_level
|
||||||
|
|
||||||
if (u_json_get(json, "model_number")) {
|
if (u_json_get(json, "model_number")) {
|
||||||
JSON_STRING(json, "model_number", d->firmware.model_number);
|
JSON_STRING(json, "model_number", d->firmware.model_number);
|
||||||
} else {
|
} else if (u_json_get(json, "model_number")) {
|
||||||
JSON_STRING(json, "model_name", d->firmware.model_number);
|
JSON_STRING(json, "model_name", d->firmware.model_number);
|
||||||
|
} else {
|
||||||
|
VIVE_ERROR(d, "Could not find either 'model_number' or 'model_name' fields!");
|
||||||
}
|
}
|
||||||
|
|
||||||
VIVE_DEBUG(d, "Parsing model number: %s", d->firmware.model_number);
|
VIVE_DEBUG(d, "Parsing model number: %s", d->firmware.model_number);
|
||||||
|
@ -415,7 +417,8 @@ vive_config_parse(struct vive_config *d, char *json_string, enum u_logging_level
|
||||||
d->variant = VIVE_VARIANT_PRO;
|
d->variant = VIVE_VARIANT_PRO;
|
||||||
VIVE_DEBUG(d, "Found HTC Vive Pro HMD");
|
VIVE_DEBUG(d, "Found HTC Vive Pro HMD");
|
||||||
} else {
|
} else {
|
||||||
VIVE_ERROR(d, "Failed to parse Vive HMD variant");
|
VIVE_ERROR(d, "Failed to parse Vive HMD variant!\n\tfirmware.model_[number|name]: '%s'",
|
||||||
|
d->firmware.model_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (d->variant) {
|
switch (d->variant) {
|
||||||
|
|
Loading…
Reference in a new issue