diff options
author | Justin Berger <j.david.berger@gmail.com> | 2018-04-02 10:10:33 -0600 |
---|---|---|
committer | Justin Berger <j.david.berger@gmail.com> | 2018-04-02 10:10:33 -0600 |
commit | 75460f240c9d003e4ca2e6dda9b2146a74df7ffa (patch) | |
tree | 957b26f0539df176b61ad2ec72fbb0658b147919 /src/survive_disambiguator.c | |
parent | 2b63278497130d01b1fbc7e6a94b6ad8e32ab4dd (diff) | |
parent | 1724abef15a4090640bd82ba408681438316de7e (diff) | |
download | libsurvive-75460f240c9d003e4ca2e6dda9b2146a74df7ffa.tar.gz libsurvive-75460f240c9d003e4ca2e6dda9b2146a74df7ffa.tar.bz2 |
Merge remote-tracking branch 'origin/master' into imu
Diffstat (limited to 'src/survive_disambiguator.c')
-rw-r--r-- | src/survive_disambiguator.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/survive_disambiguator.c b/src/survive_disambiguator.c index 39b23b6..73e61a8 100644 --- a/src/survive_disambiguator.c +++ b/src/survive_disambiguator.c @@ -1,3 +1,21 @@ #include "survive.h" -void handle_lightcap(SurviveObject *so, LightcapElement *le) { so->ctx->lightcapfunction(so, le); } +#include "survive_playback.h" +#include <os_generic.h> +#include <stdio.h> + +//#define LOG_LIGHTDATA + +void handle_lightcap(SurviveObject *so, LightcapElement *le) { + survive_recording_lightcap(so, le); +#ifdef LOG_LIGHTDATA + static FILE *flog; + static double start = 0; + if (!flog) { + flog = fopen("lightcap.txt", "wb"); + start = OGGetAbsoluteTime(); + } + fprintf(flog, "%.6f %2d %4d %9d\n", OGGetAbsoluteTime() - start, le->sensor_id, le->length, le->timestamp); +#endif + so->ctx->lightcapfunction(so, le); +} |