Calibration program for my port of FreeIMU library. Use it with the FreeIMU Cube program or the python calibration program.

Dependencies:   FreeIMU mbed-rtos mbed

Files at this revision

API Documentation at this revision

Comitter:
tyftyftyf
Date:
Wed Mar 28 21:24:12 2018 +0000
Parent:
4:145d1eb8a15d
Child:
6:0fe9b3fd15f9
Commit message:
fix build error

Changed in this revision

FreeIMU.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/FreeIMU.lib	Wed Mar 28 21:07:33 2018 +0000
+++ b/FreeIMU.lib	Wed Mar 28 21:24:12 2018 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/tyftyftyf/code/FreeIMU/#a2edd3ced80e
+http://mbed.org/users/tyftyftyf/code/FreeIMU/#1b22e19f4ec6
--- a/main.cpp	Wed Mar 28 21:07:33 2018 +0000
+++ b/main.cpp	Wed Mar 28 21:24:12 2018 +0000
@@ -92,7 +92,7 @@
 
         if(cmd=='v') {
             char str[256];
-            sprintf(str, "FreeIMU library by %s, FREQ:%s, LIB_VERSION: %s, IMU: %s", FREEIMU_DEVELOPER, 0x10000000, FREEIMU_LIB_VERSION, 0);
+            sprintf(str, "FreeIMU library by %s, FREQ:%d, LIB_VERSION: %s, IMU: %d", FREEIMU_DEVELOPER, 0x10000000, FREEIMU_LIB_VERSION, 0);
             pc.printf("%s", str);
             pc.printf("\r\n");
         }
@@ -132,12 +132,11 @@
             uint8_t count = pc.getc();
             for(uint8_t i=0; i<count; i++) {
 
-                imu.accgyro->getMotion6(&raw_values[0], &raw_values[1], &raw_values[2], &raw_values[3], &raw_values[4], &raw_values[5]);
+                imu.accgyro->getMotion9(&raw_values[0], &raw_values[1], &raw_values[2], &raw_values[3], &raw_values[4], &raw_values[5], &raw_values[6], &raw_values[7], &raw_values[8]);
 
                 writeArr(raw_values, 6, sizeof(int16_t)); // writes accelerometer and gyro values
 
-                imu.magn->getValues(&raw_values[0], &raw_values[1], &raw_values[2]);
-                writeArr(raw_values, 3, sizeof(int16_t)); // write magnetometer values
+                writeArr(&raw_values[6], 3, sizeof(int16_t)); // write magnetometer values
 
                 pc.printf("\r\n");
                 Thread::wait(4);