aboutsummaryrefslogtreecommitdiff
path: root/data_recorder.c
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2018-03-10 20:52:34 -0500
committercnlohr <lohr85@gmail.com>2018-03-10 20:52:34 -0500
commit4b33798e33e5d2841a91041dad8b99ddfbe29b6b (patch)
tree2cee43bf056216149529a617fadddb0ecb72db5c /data_recorder.c
parent1d0a7fc7c84ec9977cf9f456dcccd2b69c7ab9e2 (diff)
downloadlibsurvive-4b33798e33e5d2841a91041dad8b99ddfbe29b6b.tar.gz
libsurvive-4b33798e33e5d2841a91041dad8b99ddfbe29b6b.tar.bz2
Use HIDAPI and update formatting for the data recorder.
Diffstat (limited to 'data_recorder.c')
-rw-r--r--data_recorder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/data_recorder.c b/data_recorder.c
index 6123d57..80e95be 100644
--- a/data_recorder.c
+++ b/data_recorder.c
@@ -53,7 +53,7 @@ double timestamp_in_us() {
int write_to_output(const char *format, ...) {
va_list args;
va_start(args, format);
- fprintf(output_file, "%.17g ", timestamp_in_us());
+ fprintf(output_file, "%0.6f ", timestamp_in_us());
vfprintf(output_file, format, args);
va_end(args);
@@ -116,7 +116,7 @@ void my_light_process(struct SurviveObject *so, int sensor_id, int acode,
void my_imu_process(struct SurviveObject *so, int mask, FLT *accelgyro,
uint32_t timecode, int id) {
survive_default_imu_process(so, mask, accelgyro, timecode, id);
- write_to_output("I %s %d %u %.17g %.17g %.17g %.17g %.17g %.17g %d\n",
+ write_to_output("I %s %d %u %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %d\n",
so->codename, mask, timecode, accelgyro[0], accelgyro[1],
accelgyro[2], accelgyro[3], accelgyro[4], accelgyro[5], id);
}