diff options
author | CNLohr <charles@cnlohr.com> | 2018-04-15 20:41:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-15 20:41:22 -0400 |
commit | 69b31d3c3b1957e59d7962722a4145bfb0db16f9 (patch) | |
tree | 927d843a553ef53217c283f19f16728b0ca51c50 /src/survive_vive.c | |
parent | c73823e20c9ed2f2f8f6a13c2031971d8b7d7be2 (diff) | |
parent | 39a63badbb5864314a9d9e18c0871718ac5d2912 (diff) | |
download | libsurvive-69b31d3c3b1957e59d7962722a4145bfb0db16f9.tar.gz libsurvive-69b31d3c3b1957e59d7962722a4145bfb0db16f9.tar.bz2 |
Merge branch 'master' into tcc_build
Diffstat (limited to 'src/survive_vive.c')
-rwxr-xr-x | src/survive_vive.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/survive_vive.c b/src/survive_vive.c index 83bc977..d9cbc3e 100755 --- a/src/survive_vive.c +++ b/src/survive_vive.c @@ -1233,10 +1233,10 @@ static void handle_watchman( SurviveObject * w, uint8_t * readdata ) if( ( ( type & 0xe8 ) == 0xe8 ) || doimu ) //Hmm, this looks kind of yucky... we can get e8's that are accelgyro's but, cleared by first propset. { propset |= 2; - FLT agm[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + FLT agm[9] = {0, 0, 0, 0, 0, 0, 0, 0, 0}; int j; - for( j = 0; j < 6; j++ ) - agm[j] = (int16_t)(readdata[j*2+1] | (readdata[j*2+2]<<8)); + for (j = 0; j < 6; j++) + agm[j] = (int16_t)(readdata[j * 2 + 1] | (readdata[j * 2 + 2] << 8)); calibrate_acc(w, agm); calibrate_gyro(w, agm+3); w->ctx->imuproc( w, 3, agm, (time1<<24)|(time2<<16)|readdata[0], 0 ); @@ -1660,6 +1660,7 @@ static int LoadConfig( SurviveViveData * sv, SurviveObject * so, int devno, int if( len < 0 ) { + survive_remove_object(ctx, so); return len; } |