aboutsummaryrefslogtreecommitdiff
path: root/src/survive_vive.c
diff options
context:
space:
mode:
authorJoshua Allen <axlecrusher@gmail.com>2017-05-07 09:14:07 -0400
committerJoshua Allen <axlecrusher@gmail.com>2017-05-07 09:14:07 -0400
commit746a1eb0bf8df3effa55e79ff3513d9dcd9ac87c (patch)
tree7b92b1cabc9309804e7d5b598085b23945c37610 /src/survive_vive.c
parentf2232824cdaf4b896348bf421493437b49ff2844 (diff)
downloadlibsurvive-746a1eb0bf8df3effa55e79ff3513d9dcd9ac87c.tar.gz
libsurvive-746a1eb0bf8df3effa55e79ff3513d9dcd9ac87c.tar.bz2
use multiplication
Diffstat (limited to 'src/survive_vive.c')
-rwxr-xr-xsrc/survive_vive.c12
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 );