aboutsummaryrefslogtreecommitdiff
path: root/src/survive_vive.c
diff options
context:
space:
mode:
authormwturvey <michael.w.turvey@intel.com>2017-03-24 15:19:59 -0700
committermwturvey <michael.w.turvey@intel.com>2017-03-24 15:19:59 -0700
commit4dc1d72785c660c206f8def9d8c8aa32289c2709 (patch)
treeb6b06ee4504ac4afd76a885343373919e120341b /src/survive_vive.c
parentf7d1c19e299df46087eb8693d2d0c0637d2e395f (diff)
downloadlibsurvive-4dc1d72785c660c206f8def9d8c8aa32289c2709.tar.gz
libsurvive-4dc1d72785c660c206f8def9d8c8aa32289c2709.tar.bz2
More cleanup & finishing genericization of calibrator
Diffstat (limited to 'src/survive_vive.c')
-rwxr-xr-xsrc/survive_vive.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/survive_vive.c b/src/survive_vive.c
index 55e949a..a5c731d 100755
--- a/src/survive_vive.c
+++ b/src/survive_vive.c
@@ -834,7 +834,6 @@ static void handle_watchman( SurviveObject * w, uint8_t * readdata )
qty-=2;
int propset = 0;
int doimu = 0;
- int i;
if( (type & 0xf0) == 0xf0 )
{
@@ -911,10 +910,9 @@ static void handle_watchman( SurviveObject * w, uint8_t * readdata )
*readdata = type; //Put 'type' back on stack.
uint8_t * mptr = readdata + qty-3-1; //-3 for timecode, -1 to
-//#define DEBUG_WATCHMAN
#ifdef DEBUG_WATCHMAN
printf( "_%s ", w->codename);
- for( i = 0; i < qty; i++ )
+ for(int i = 0; i < qty; i++ )
{
printf( "%02x ", readdata[i] );
}
@@ -1198,7 +1196,7 @@ void survive_data_cb( SurviveUSBInterface * si )
unsigned short *length = (unsigned short *)(&(readdata[2]));
unsigned long *time = (unsigned long *)(&(readdata[4]));
LightcapElement le;
- le.sensor_id = POP2;
+ le.sensor_id = (uint8_t)POP2;
le.length = POP2;
le.timestamp = POP4;
if( le.sensor_id == 0xff ) break;