aboutsummaryrefslogtreecommitdiff
path: root/src/survive_disambiguator.c
blob: cf890680deaa7ce421cb70ece22ded0d063abfc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "survive.h"
#include <os_generic.h>
#include <stdio.h>

//#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);
}