aboutsummaryrefslogtreecommitdiff
path: root/src/survive_data.c
diff options
context:
space:
mode:
authormwturvey <michael.w.turvey@intel.com>2017-03-28 10:15:36 -0700
committermwturvey <michael.w.turvey@intel.com>2017-03-28 10:15:36 -0700
commitb3bdcdb838ed57986f359b2181a624bfd1acbbf1 (patch)
tree2ecf2a332bec3617744d1575b74498b7defa44db /src/survive_data.c
parentea0c125b90703edae5ea2b0d02095406515aa7a3 (diff)
downloadlibsurvive-b3bdcdb838ed57986f359b2181a624bfd1acbbf1.tar.gz
libsurvive-b3bdcdb838ed57986f359b2181a624bfd1acbbf1.tar.bz2
Fix Tracker IMU
Diffstat (limited to 'src/survive_data.c')
-rw-r--r--src/survive_data.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/survive_data.c b/src/survive_data.c
index 9447104..3eb5890 100644
--- a/src/survive_data.c
+++ b/src/survive_data.c
@@ -154,8 +154,14 @@ void handle_lightcap2_sync(SurviveObject * so, LightcapElement * le )
{
if (lcd->per_sweep.activeLighthouse != -1)
{
- // hmm, it appears we got two non-skip pulses at the same time. That should never happen
- fprintf(stderr, "WARNING: Two non-skip pulses received on the same cycle!\n");
+ static int pulseWarningCount=0;
+
+ if (pulseWarningCount < 5)
+ {
+ pulseWarningCount++;
+ // hmm, it appears we got two non-skip pulses at the same time. That should never happen
+ fprintf(stderr, "WARNING: Two non-skip pulses received on the same cycle!\n");
+ }
}
lcd->per_sweep.activeLighthouse = 1;
lcd->per_sweep.activeSweepStartTime = le->timestamp;