aboutsummaryrefslogtreecommitdiff
path: root/src/survive_disambiguator.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/survive_disambiguator.c')
-rw-r--r--src/survive_disambiguator.c20
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);
+}