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
This commit is contained in:
DrZiplok@gmail.com 2010-12-30 07:52:35 +00:00
parent f4511fa7e6
commit 19f6c999ce

View File

@ -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