ECE 4180 Final Project

Dependencies:   mbed PinDetect

Files at this revision

API Documentation at this revision

Comitter:
zhihanzhang
Date:
Tue Dec 14 03:55:28 2021 +0000
Parent:
2:36abf8e18ade
Commit message:
ECE 4180 Final Project

Changed in this revision

LSM9DS1.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 36abf8e18ade -r d348dcebdf74 LSM9DS1.cpp
--- a/LSM9DS1.cpp	Wed Feb 03 18:45:40 2016 +0000
+++ b/LSM9DS1.cpp	Tue Dec 14 03:55:28 2021 +0000
@@ -346,9 +346,10 @@
         gBiasRawTemp[1] += gy;
         gBiasRawTemp[2] += gz;
         readAccel();
-        aBiasRawTemp[0] += ax;
+        aBiasRawTemp[0] += ax - (int16_t)(1./aRes);
         aBiasRawTemp[1] += ay;
-        aBiasRawTemp[2] += az - (int16_t)(1./aRes); // Assumes sensor facing up!
+        aBiasRawTemp[2] += az;
+        //aBiasRawTemp[2] += az - (int16_t)(1./aRes); // Assumes sensor facing up!
     }
     for (ii = 0; ii < 3; ii++) {
         gBiasRaw[ii] = gBiasRawTemp[ii] / samples;