Successful acro and level mode now! Relying on MPU9250 as base sensor. I'm working continuously on tuning and features :) NEWEST VERSION ON: https://github.com/MaEtUgR/FlyBed (CODE 100% compatible/copyable)

Dependencies:   mbed

Revision:
8:609a2ad4c30e
Parent:
5:8ea99e98de73
--- a/IMU/MPU9250/MPU9250.cpp	Mon Sep 14 12:49:08 2015 +0000
+++ b/IMU/MPU9250/MPU9250.cpp	Thu Nov 19 18:47:27 2015 +0000
@@ -17,7 +17,7 @@
     5             |10           |13.8     |10           |13.4     |1 
     6             |5            |19.0     |5            |18.6     |1 
     */
-    writeRegister8(MPU9250_CONFIG, 0x03);
+    writeRegister8(MPU9250_CONFIG, 0x00);
     writeRegister8(MPU9250_GYRO_CONFIG, 0x18);              // scales gyros range to +-2000dps
     writeRegister8(MPU9250_ACCEL_CONFIG, 0x08);             // scales accelerometers range to +-4g
 }
@@ -35,7 +35,7 @@
     int16_t rawGyro[3];
     readRegister48(MPU9250_GYRO_XOUT_H, rawGyro);
     
-    int16_t offsetGyro[3] = {-31, -15, -11};                // TODO: make better calibration
+    int16_t offsetGyro[3] = {-31, -16, -12};                // TODO: make better calibration
     
     for (int i = 0; i < 3; i++)
         Gyro[i] = (rawGyro[i] - offsetGyro[i]) * 0.07 * 0.87;        // subtract offset from calibration and multiply unit factor to get degree per second (datasheet p.10)