aboutsummaryrefslogtreecommitdiff
path: root/src/survive_data.c
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2017-03-20 01:42:32 -0400
committercnlohr <lohr85@gmail.com>2017-03-20 01:42:32 -0400
commit8253e3c3adbb54ebc3d3c8e02c017e900a83edb0 (patch)
tree55e9b2542f28f491f33350fb74c7c048f167a939 /src/survive_data.c
parenta229dec7ee46873e0b590fdbd34feb29112e4f0d (diff)
downloadlibsurvive-8253e3c3adbb54ebc3d3c8e02c017e900a83edb0.tar.gz
libsurvive-8253e3c3adbb54ebc3d3c8e02c017e900a83edb0.tar.bz2
log synctimes.
Diffstat (limited to 'src/survive_data.c')
-rw-r--r--src/survive_data.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/survive_data.c b/src/survive_data.c
index ffeacff..8c5c646 100644
--- a/src/survive_data.c
+++ b/src/survive_data.c
@@ -69,7 +69,7 @@ void handle_lightcap( SurviveObject * so, LightcapElement * le )
{
int is_new_pulse = delta > so->pulselength_min_sync /*1500*/ + last_sync_length;
- //printf("m sync %d %d %d %d\n", le->sensor_id, so->last_sync_time[ssn], le->timestamp, delta);
+
so->did_handle_ootx = 0;
@@ -114,6 +114,14 @@ void handle_lightcap( SurviveObject * so, LightcapElement * le )
}
}
}
+
+ //Extra tidbit for storing length-of-sync-pulses.
+ {
+ int32_t main_divisor = so->timebase_hz / 384000; //125 @ 48 MHz.
+ int base_station = is_new_pulse;
+ printf( "%s %d %d %d\n", so->codename, le->sensor_id, so->sync_set_number, le->length );
+ ctx->lightproc( so, le->sensor_id, -3 - so->sync_set_number, 0, le->timestamp, le->length );
+ }
}