From 19f6c999ce726a4fd55a3f50f5e45a93578e6a0c Mon Sep 17 00:00:00 2001 From: "DrZiplok@gmail.com" Date: Thu, 30 Dec 2010 07:52:35 +0000 Subject: [PATCH] We should call imu.update() before asking for accel/gyro values so that we get timely, fresh numbers. Most other consumers of the accel/gyro values should be asking us for them anyway. At that point, what they are getting are the values we sampled here. git-svn-id: https://arducopter.googlecode.com/svn/trunk@1376 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- libraries/AP_DCM/AP_DCM.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_DCM/AP_DCM.cpp b/libraries/AP_DCM/AP_DCM.cpp index 11f4d0c1ae..76cede5225 100644 --- a/libraries/AP_DCM/AP_DCM.cpp +++ b/libraries/AP_DCM/AP_DCM.cpp @@ -41,6 +41,7 @@ AP_DCM::set_compass(Compass *compass) void AP_DCM::update_DCM(float _G_Dt) { + _imu->update(); _gyro_vector = _imu->get_gyro(); // Get current values for IMU sensors _accel_vector = _imu->get_accel(); // Get current values for IMU sensors