aboutsummaryrefslogtreecommitdiff
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
parentea0c125b90703edae5ea2b0d02095406515aa7a3 (diff)
downloadlibsurvive-b3bdcdb838ed57986f359b2181a624bfd1acbbf1.tar.gz
libsurvive-b3bdcdb838ed57986f359b2181a624bfd1acbbf1.tar.bz2
Fix Tracker IMU
-rw-r--r--src/poser_turveytori.c2
-rw-r--r--src/survive_data.c10
-rwxr-xr-xsrc/survive_vive.c17
3 files changed, 10 insertions, 19 deletions
diff --git a/src/poser_turveytori.c b/src/poser_turveytori.c
index 5c3350b..df691e3 100644
--- a/src/poser_turveytori.c
+++ b/src/poser_turveytori.c
@@ -1211,7 +1211,7 @@ int PoserTurveyTori( SurviveObject * so, PoserData * pd )
case POSERDATA_IMU:
{
PoserDataIMU * imu = (PoserDataIMU*)pd;
- //printf( "IMU:%s (%f %f %f) (%f %f %f)\n", so->codename, imu->accel[0], imu->accel[1], imu->accel[2], imu->gyro[0], imu->gyro[1], imu->gyro[2] );
+ printf( "IMU:%s (%f %f %f) (%f %f %f)\n", so->codename, imu->accel[0], imu->accel[1], imu->accel[2], imu->gyro[0], imu->gyro[1], imu->gyro[2] );
break;
}
case POSERDATA_LIGHT:
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;
diff --git a/src/survive_vive.c b/src/survive_vive.c
index a5c731d..757fa11 100755
--- a/src/survive_vive.c
+++ b/src/survive_vive.c
@@ -1105,6 +1105,7 @@ void survive_data_cb( SurviveUSBInterface * si )
}
case USB_IF_LIGHTHOUSE:
case USB_IF_W_WATCHMAN1:
+ case USB_IF_TRACKER0:
{
int i;
//printf( "%d -> ", size );
@@ -1156,22 +1157,6 @@ void survive_data_cb( SurviveUSBInterface * si )
}
break;
}
- case USB_IF_TRACKER0:
- {
- SurviveObject * w = obj;
- if( id == 32 )
- {
- // TODO: Looks like this will need to be handle_tracker, since
- // it appears the interface is sufficiently different.
- // More work needd to reverse engineer it.
- //handle_wired_watchman( w, readdata, size);
- }
- else
- {
- SV_INFO( "Unknown tracker code %d\n", id );
- }
- break;
- }
case USB_IF_LIGHTCAP:
{
int i;