my fork
Revision 3:a9bd86f2dcba, committed 2019-12-05
- Comitter:
- curtdog4189
- Date:
- Thu Dec 05 02:05:07 2019 +0000
- Parent:
- 2:36abf8e18ade
- Commit message:
- idk
Changed in this revision
| LSM9DS1.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/LSM9DS1.cpp Wed Feb 03 18:45:40 2016 +0000
+++ b/LSM9DS1.cpp Thu Dec 05 02:05:07 2019 +0000
@@ -34,6 +34,8 @@
//#endif
#define LSM9DS1_COMMUNICATION_TIMEOUT 1000
+DigitalOut startCal(LED4);
+DigitalOut finishedCal(LED3);
float magSensitivity[4] = {0.00014, 0.00029, 0.00043, 0.00058};
extern Serial pc;
@@ -368,7 +370,8 @@
int i, j;
int16_t magMin[3] = {0, 0, 0};
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");
+ startCal = 1;
+ //pc.printf("\n\n\r Rotate IMU device at least 360 in horizontal plane for magnetometer calibration\n\r");
wait(0.5);
for (i=0; i<1000; i++) {
while (!magAvailable(ALL_AXIS));
@@ -389,7 +392,11 @@
if (loadIn)
magOffset(j, mBiasRaw[j]);
}
- pc.printf("\n\rMAG calibration done\n\r");
+ //pc.printf("\n\rMAG calibration done\n\r");
+ finishedCal = 1;
+ startCal = 0;
+ wait(.5);
+ finishedCal = 0;
}
void LSM9DS1::magOffset(uint8_t axis, int16_t offset)
{