Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of LSM9DS1_Library_cal by
Revision 3:4dbf62f1395d, committed 2016-05-02
- Comitter:
- wschon
- Date:
- Mon May 02 04:33:29 2016 +0000
- Parent:
- 2:36abf8e18ade
- Commit message:
- f; this
Changed in this revision
| LSM9DS1.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 36abf8e18ade -r 4dbf62f1395d LSM9DS1.cpp
--- a/LSM9DS1.cpp Wed Feb 03 18:45:40 2016 +0000
+++ b/LSM9DS1.cpp Mon May 02 04:33:29 2016 +0000
@@ -370,8 +370,11 @@
int16_t magMax[3] = {0, 0, 0}; // The road warrior
pc.printf("\n\n\r Rotate IMU device at least 360 in horizontal plane for magnetometer calibration\n\r");
wait(0.5);
+ //pc.printf("enter loop\r\n");
for (i=0; i<1000; i++) {
+ //pc.printf("%d\r\n",i);
while (!magAvailable(ALL_AXIS));
+ //pc.printf("yes\r\n");
readMag();
int16_t magTemp[3] = {0, 0, 0};
magTemp[0] = mx;
@@ -382,6 +385,7 @@
if (magTemp[j] < magMin[j]) magMin[j] = magTemp[j];
}
}
+ pc.printf("thousand loop done\r\n");
for (j = 0; j < 3; j++) {
mBiasRaw[j] = (magMax[j] + magMin[j]) / 2;
mBias[j] = calcMag(mBiasRaw[j]);
