From 19d18fef008792e8918d4ded2dd7fa015bb2fedb Mon Sep 17 00:00:00 2001 From: cnlohr Date: Sun, 5 Mar 2017 09:45:38 -0500 Subject: Set max sensor # so it doesn't get confusd with -1 data. --- src/survive_data.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/survive_data.c') diff --git a/src/survive_data.c b/src/survive_data.c index e55b640..ac640c6 100644 --- a/src/survive_data.c +++ b/src/survive_data.c @@ -11,7 +11,14 @@ void handle_lightcap( struct SurviveObject * so, struct LightcapElement * le ) struct SurviveContext * ctx = so->ctx; //int32_t deltat = (uint32_t)le->timestamp - (uint32_t)so->last_master_time; -// printf( "%s %d %d %d %d %d\n", so->codename, le->sensor_id, le->type, le->length, le->timestamp, le->timestamp-so->tsl ); + //if( so->codename[0] != 'H' ) + //printf( "*** %s %d %d %d %d %d\n", so->codename, le->sensor_id, le->type, le->length, le->timestamp, le->timestamp-so->tsl ); + + if( le->sensor_id > SENSORS_PER_OBJECT ) + { + return; + } + so->tsl = le->timestamp; if( le->length < 20 ) return; ///Assuming 20 is an okay value for here. -- cgit v1.2.3 From 394cbc465e776137834eea830038b43ea98f6268 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Wed, 8 Mar 2017 00:30:48 -0500 Subject: Switch types over to avoiding extra struct keyword. Switch poses to "SurvivePose" type. --- src/survive_data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/survive_data.c') diff --git a/src/survive_data.c b/src/survive_data.c index ac640c6..63cc5c2 100644 --- a/src/survive_data.c +++ b/src/survive_data.c @@ -6,9 +6,9 @@ #include //This is the disambiguator function, for taking light timing and figuring out place-in-sweep for a given photodiode. -void handle_lightcap( struct SurviveObject * so, struct LightcapElement * le ) +void handle_lightcap( SurviveObject * so, LightcapElement * le ) { - struct 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' ) -- cgit v1.2.3