From: Olivier Matz Date: Tue, 9 Sep 2014 17:04:07 +0000 (+0200) Subject: fix global imu position X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7a935b805ebd1733085a7bb8075de8eae34c4b99;p=fpv.git fix global imu position --- diff --git a/imuboard/imu.c b/imuboard/imu.c index 7e9a17f..c113e1c 100644 --- a/imuboard/imu.c +++ b/imuboard/imu.c @@ -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);