]> git.droids-corp.org - fpv.git/commitdiff
fix global imu position
authorOlivier Matz <zer0@droids-corp.org>
Tue, 9 Sep 2014 17:04:07 +0000 (19:04 +0200)
committerOlivier Matz <zer0@droids-corp.org>
Tue, 9 Sep 2014 17:49:31 +0000 (19:49 +0200)
imuboard/imu.c

index 7e9a17f6421944151dc8dfe7a2a9741e506d7c53..c113e1cfbfb1f3f36b733087cfafeecfbad416fe 100644 (file)
@@ -57,8 +57,8 @@ static void imu_cb(struct callout_mgr *cm, struct callout *tim, void *arg)
        IRQ_UNLOCK(irq_flags);
 
        mpu6050_read_all_axes(&g_imu);
-       MadgwickAHRSupdate(&g_imu, &g_quat);
-       quaternion2euler(&g_quat, &g_euler);
+       MadgwickAHRSupdate(&g_imu, &quat);
+       quaternion2euler(&quat, &g_euler);
 
        /* update global variables */
        IRQ_LOCK(irq_flags);