st/gui+steamvr_drv: Port to u_logging.

This commit is contained in:
Lubosz Sarnecki 2020-12-18 16:24:03 +01:00 committed by Jakob Bornecrantz
parent 521daac012
commit 12a3a24315
3 changed files with 25 additions and 24 deletions

View file

@ -128,7 +128,7 @@ save_calibration(struct calibration_scene *cs)
cs->settings->calibration_path);
char *str = cJSON_Print(root);
fprintf(stderr, "%s\n", str);
U_LOG_D("%s", str);
cJSON_Delete(root);
FILE *config_file =

View file

@ -10,6 +10,7 @@
#include "xrt/xrt_config_drivers.h"
#include "util/u_misc.h"
#include "util/u_logging.h"
#include "math/m_api.h"
@ -182,27 +183,27 @@ render_cheat_menu(struct gui_remote *gr, struct gui_program *p)
}
if (igButton("Dump left", zero_dims)) {
fprintf(stderr,
"d->left.pose.position.x = %ff;\n"
"d->left.pose.position.y = %ff;\n"
"d->left.pose.position.z = %ff;\n"
"d->left.pose.orientation.x = %ff;\n"
"d->left.pose.orientation.y = %ff;\n"
"d->left.pose.orientation.z = %ff;\n"
"d->left.pose.orientation.w = %ff;\n"
"d->left.linear_velocity.x = %ff;\n"
"d->left.linear_velocity.y = %ff;\n"
"d->left.linear_velocity.z = %ff;\n"
"d->left.angular_velocity.x = %ff;\n"
"d->left.angular_velocity.y = %ff;\n"
"d->left.angular_velocity.z = %ff;\n",
d->left.pose.position.x, d->left.pose.position.y,
d->left.pose.position.z, d->left.pose.orientation.x,
d->left.pose.orientation.y, d->left.pose.orientation.z,
d->left.pose.orientation.w, d->left.linear_velocity.x,
d->left.linear_velocity.y, d->left.linear_velocity.z,
d->left.angular_velocity.x, d->left.angular_velocity.y,
d->left.angular_velocity.z);
U_LOG_RAW(
"d->left.pose.position.x = %ff;\n"
"d->left.pose.position.y = %ff;\n"
"d->left.pose.position.z = %ff;\n"
"d->left.pose.orientation.x = %ff;\n"
"d->left.pose.orientation.y = %ff;\n"
"d->left.pose.orientation.z = %ff;\n"
"d->left.pose.orientation.w = %ff;\n"
"d->left.linear_velocity.x = %ff;\n"
"d->left.linear_velocity.y = %ff;\n"
"d->left.linear_velocity.z = %ff;\n"
"d->left.angular_velocity.x = %ff;\n"
"d->left.angular_velocity.y = %ff;\n"
"d->left.angular_velocity.z = %ff;\n",
d->left.pose.position.x, d->left.pose.position.y,
d->left.pose.position.z, d->left.pose.orientation.x,
d->left.pose.orientation.y, d->left.pose.orientation.z,
d->left.pose.orientation.w, d->left.linear_velocity.x,
d->left.linear_velocity.y, d->left.linear_velocity.z,
d->left.angular_velocity.x, d->left.angular_velocity.y,
d->left.angular_velocity.z);
}
}

View file

@ -728,7 +728,7 @@ public:
handle, state, 0);
// ovrd_log("Update %s: %d\n",
// m_controls[i].steamvr_control_path, state);
// printf("Update %s: %d\n",
// U_LOG_D("Update %s: %d",
// m_controls[i].steamvr_control_path,
// state);
}
@ -754,7 +754,7 @@ public:
// ovrd_log("Update %s: %f\n",
// m_controls[i].steamvr_control_path,
// state->x);
// printf("Update %s: %f\n",
// U_LOG_D("Update %s: %f",
// m_controls[i].steamvr_control_path,
// value);
}