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