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:541db6c69ffa, committed 2016-03-13
- Comitter:
- bhill42
- Date:
- Sun Mar 13 23:28:41 2016 +0000
- Parent:
- 2:36abf8e18ade
- Commit message:
- BEFORE PICOJPEG
Changed in this revision
| LSM9DS1.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 36abf8e18ade -r 541db6c69ffa LSM9DS1.cpp
--- a/LSM9DS1.cpp Wed Feb 03 18:45:40 2016 +0000
+++ b/LSM9DS1.cpp Sun Mar 13 23:28:41 2016 +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));
@@ -385,11 +385,11 @@
for (j = 0; j < 3; j++) {
mBiasRaw[j] = (magMax[j] + magMin[j]) / 2;
mBias[j] = calcMag(mBiasRaw[j]);
- pc.printf("%f ",mBias[j]);
+ //////pc.printf("%f ",mBias[j]);
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);
