aboutsummaryrefslogtreecommitdiff
path: root/src/survive_data.c
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2017-03-18 15:21:24 -0400
committercnlohr <lohr85@gmail.com>2017-03-18 15:21:24 -0400
commit0f94e39d96fbc2744e61b85d2884250d0783eb11 (patch)
tree8444122c33e87f992f195aef604fa10bce398530 /src/survive_data.c
parent67ccb935ef12d9ab25f8223dea5208b96ae5052f (diff)
downloadlibsurvive-0f94e39d96fbc2744e61b85d2884250d0783eb11.tar.gz
libsurvive-0f94e39d96fbc2744e61b85d2884250d0783eb11.tar.bz2
Add more possible debugging if turned on.
Diffstat (limited to 'src/survive_data.c')
-rw-r--r--src/survive_data.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/survive_data.c b/src/survive_data.c
index 5c5a5e9..0789203 100644
--- a/src/survive_data.c
+++ b/src/survive_data.c
@@ -8,17 +8,31 @@
//This is the disambiguator function, for taking light timing and figuring out place-in-sweep for a given photodiode.
void handle_lightcap( SurviveObject * so, LightcapElement * le )
{
- SurviveContext * ctx = so->ctx;
+ SurviveContext * ctx = so->ctx;
//int32_t deltat = (uint32_t)le->timestamp - (uint32_t)so->last_master_time;
- //if( so->codename[0] != 'H' )
-
-
if( le->sensor_id > SENSORS_PER_OBJECT )
{
return;
}
+#if 0
+ if( so->codename[0] == 'H' )
+ {
+ static int lt;
+ static int last;
+ if( le->length > 1000 )
+ {
+ int dl = le->timestamp - lt;
+ lt = le->timestamp;
+ if( dl > 10000 || dl < -10000 )
+ printf( "+++%s %3d %5d %9d ", so->codename, le->sensor_id, le->length, dl );
+ if( dl > 100000 ) printf(" \n" );
+ }
+ last=le->length;
+ }
+#endif
+
so->tsl = le->timestamp;
if( le->length < 20 ) return; ///Assuming 20 is an okay value for here.