blob: 6c19475f09bf271d80058cb0f5cc8ac719ff3a7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include "survive.h"
#include <os_generic.h>
#include <stdio.h>
#include "survive_playback.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);
}
|