AP_NavEKF2: Retrieve correct time-stamp for active compass

This commit is contained in:
Paul Riseborough 2015-11-09 13:42:17 +11:00 committed by Andrew Tridgell
parent 6698d4379d
commit 3099d94e78
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ void NavEKF2_core::readMagData()
}
// store time of last measurement update
lastMagUpdate_us = _ahrs->get_compass()->last_update_usec();
lastMagUpdate_us = _ahrs->get_compass()->last_update_usec(magSelectIndex);
// estimate of time magnetometer measurement was taken, allowing for delays
magDataNew.time_ms = imuSampleTime_ms - frontend->magDelay_ms;