diff options
author | Joshua Allen <axlecrusher@gmail.com> | 2017-05-07 09:14:07 -0400 |
---|---|---|
committer | Joshua Allen <axlecrusher@gmail.com> | 2017-05-07 09:14:07 -0400 |
commit | 746a1eb0bf8df3effa55e79ff3513d9dcd9ac87c (patch) | |
tree | 7b92b1cabc9309804e7d5b598085b23945c37610 /src/survive_vive.c | |
parent | f2232824cdaf4b896348bf421493437b49ff2844 (diff) | |
download | libsurvive-746a1eb0bf8df3effa55e79ff3513d9dcd9ac87c.tar.gz libsurvive-746a1eb0bf8df3effa55e79ff3513d9dcd9ac87c.tar.bz2 |
use multiplication
Diffstat (limited to 'src/survive_vive.c')
-rwxr-xr-x | src/survive_vive.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/survive_vive.c b/src/survive_vive.c index b44e4fc..9a3cb03 100755 --- a/src/survive_vive.c +++ b/src/survive_vive.c @@ -924,16 +924,16 @@ static void handle_watchman( SurviveObject * w, uint8_t * readdata ) calibrate_acc(w, agm); //I don't understand where these numbers come from but the data from the WMD seems to max out at 255... - agm[0]/=255.0f; - agm[1]/=255.0f; - agm[2]/=255.0f; + agm[0]*=(1.0f/255.0f); + agm[1]*=(1.0f/255.0f); + agm[2]*=(1.0f/255.0f); calibrate_gyro(w, agm+3); //I don't understand where these numbers come from but the data from the WMD seems to max out at 255... - agm[3]/=255.0f; - agm[4]/=255.0f; - agm[5]/=255.0f; + agm[3]*=(1.0f/255.0f); + agm[4]*=(1.0f/255.0f); + agm[5]*=(1.0f/255.0f); w->ctx->imuproc( w, 3, agm, (time1<<24)|(time2<<16)|readdata[0], 0 ); |