Fitness Tracker

Dependencies:   PinDetect mbed

Fork of LSM9DS1_Library_cal by jim hamblen

Files at this revision

API Documentation at this revision

Comitter:
FrederickLemuel
Date:
Tue Mar 07 22:06:01 2017 +0000
Parent:
2:36abf8e18ade
Commit message:
Project

Changed in this revision

LSM9DS1.cpp Show annotated file Show diff for this revision Revisions of this file
LSM9DS1.h Show annotated file Show diff for this revision Revisions of this file
LSM9DS1_Registers.h Show annotated file Show diff for this revision Revisions of this file
diff -r 36abf8e18ade -r 1d8b5682ed0e LSM9DS1.cpp
--- a/LSM9DS1.cpp	Wed Feb 03 18:45:40 2016 +0000
+++ b/LSM9DS1.cpp	Tue Mar 07 22:06:01 2017 +0000
@@ -169,7 +169,7 @@
     // each device. Store those in a variable so we can return them.
     uint8_t mTest = mReadByte(WHO_AM_I_M);      // Read the gyro WHO_AM_I
     uint8_t xgTest = xgReadByte(WHO_AM_I_XG);   // Read the accel/mag WHO_AM_I
-    pc.printf("%x, %x, %x, %x\n\r", mTest, xgTest, _xgAddress, _mAddress);
+   // pc.printf("%x, %x, %x, %x\n\r", mTest, xgTest, _xgAddress, _mAddress);
     uint16_t whoAmICombined = (xgTest << 8) | mTest;
 
     if (whoAmICombined != ((WHO_AM_I_AG_RSP << 8) | WHO_AM_I_M_RSP))
@@ -331,7 +331,7 @@
     int ii;
     int32_t aBiasRawTemp[3] = {0, 0, 0};
     int32_t gBiasRawTemp[3] = {0, 0, 0};
-    pc.printf("\n\rPlace IMU on level surface and do not move it for gyro and accel calibration.\n\r");
+    //pc.printf("\n\rPlace IMU on level surface and do not move it for gyro and accel calibration.\n\r");
     wait(1);
     // Turn on FIFO and set threshold to 32 samples
     enableFIFO(true);
@@ -368,7 +368,7 @@
     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");
+    //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 +389,7 @@
         if (loadIn)
             magOffset(j, mBiasRaw[j]);
     }
-    pc.printf("\n\rMAG calibration done\n\r");
+   // pc.printf("\n\rMAG calibration done\n\r");
 }
 void LSM9DS1::magOffset(uint8_t axis, int16_t offset)
 {
@@ -961,7 +961,7 @@
     // Whether we're using I2C or SPI, write a byte using the
     // gyro-specific I2C address or SPI CS pin.
     if (settings.device.commInterface == IMU_MODE_I2C) {
-        pc.printf("yo");
+        //pc.printf("yo");
         I2CwriteByte(_xgAddress, subAddress, data);
     } else if (settings.device.commInterface == IMU_MODE_SPI) {
         SPIwriteByte(_xgAddress, subAddress, data);
@@ -973,7 +973,7 @@
     // Whether we're using I2C or SPI, write a byte using the
     // accelerometer-specific I2C address or SPI CS pin.
     if (settings.device.commInterface == IMU_MODE_I2C) {
-        pc.printf("mo");
+       // pc.printf("mo");
         return I2CwriteByte(_mAddress, subAddress, data);
     } else if (settings.device.commInterface == IMU_MODE_SPI)
         return SPIwriteByte(_mAddress, subAddress, data);
diff -r 36abf8e18ade -r 1d8b5682ed0e LSM9DS1.h
--- a/LSM9DS1.h	Wed Feb 03 18:45:40 2016 +0000
+++ b/LSM9DS1.h	Tue Mar 07 22:06:01 2017 +0000
@@ -1,3 +1,4 @@
+
 /******************************************************************************
 SFE_LSM9DS1.h
 SFE_LSM9DS1 Library Header File
diff -r 36abf8e18ade -r 1d8b5682ed0e LSM9DS1_Registers.h
--- a/LSM9DS1_Registers.h	Wed Feb 03 18:45:40 2016 +0000
+++ b/LSM9DS1_Registers.h	Tue Mar 07 22:06:01 2017 +0000
@@ -1,3 +1,4 @@
+
 /******************************************************************************
 LSM9DS1_Registers.h
 SFE_LSM9DS1 Library - LSM9DS1 Register Map