From 7a935b805ebd1733085a7bb8075de8eae34c4b99 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Tue, 9 Sep 2014 19:04:07 +0200 Subject: [PATCH] fix global imu position --- imuboard/imu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.39.5