From 746a1eb0bf8df3effa55e79ff3513d9dcd9ac87c Mon Sep 17 00:00:00 2001 From: Joshua Allen Date: Sun, 7 May 2017 09:14:07 -0400 Subject: use multiplication --- src/survive_vive.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/survive_vive.c') 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 ); -- cgit v1.2.3