aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/survive_disambiguator.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/survive_disambiguator.c b/src/survive_disambiguator.c
index 39b23b6..cf89068 100644
--- a/src/survive_disambiguator.c
+++ b/src/survive_disambiguator.c
@@ -1,3 +1,16 @@
#include "survive.h"
+#include <os_generic.h>
+#include <stdio.h>
-void handle_lightcap(SurviveObject *so, LightcapElement *le) { so->ctx->lightcapfunction(so, le); }
+//#define LOG_LIGHTDATA
+
+void handle_lightcap(SurviveObject *so, LightcapElement *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);
+}