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)
Diff: IMU/IMU_10DOF.cpp
- Revision:
- 8:609a2ad4c30e
- Parent:
- 7:90f876d47862
--- a/IMU/IMU_10DOF.cpp Mon Sep 14 12:49:08 2015 +0000 +++ b/IMU/IMU_10DOF.cpp Thu Nov 19 18:47:27 2015 +0000 @@ -1,6 +1,6 @@ #include "IMU_10DOF.h" -IMU_10DOF::IMU_10DOF(PinName MOSI, PinName MISO, PinName SCLK, PinName CS) : mpu(MOSI, MISO, SCLK, CS) +IMU_10DOF::IMU_10DOF(PinName MOSI, PinName MISO, PinName SCLK, PinName CS, PinName SDA, PinName SCL) : mpu(MOSI, MISO, SCLK, CS), mpu2(SDA, SCL) { dt = 0; dt_sensors = 0; @@ -15,6 +15,7 @@ SensorTimer.start(); // start time for measuring sensors mpu.readGyro(); // reading sensor data mpu.readAcc(); + mpu2.read(); // reading sensor data SensorTimer.stop(); // stop time for measuring sensors dt_sensors = SensorTimer.read(); SensorTimer.reset(); @@ -24,4 +25,5 @@ LoopTimer.reset(); Filter.compute(dt, mpu.Gyro, mpu.Acc, mpu.Acc); + //Filter.compute(dt, mpu2.data_gyro, mpu2.data_acc, mpu2.data_acc); } \ No newline at end of file