Plane: move responsibility for logging into library

This commit is contained in:
Peter Barker 2019-03-25 23:43:04 +11:00 committed by Andrew Tridgell
parent 5d996a289a
commit 14a8bf3aec
2 changed files with 1 additions and 3 deletions

View File

@ -202,9 +202,6 @@ void Plane::update_compass(void)
{
if (AP::compass().enabled() && compass.read()) {
ahrs.set_compass(&compass);
if (should_log(MASK_LOG_COMPASS) && !ahrs.have_ekf_logging()) {
logger.Write_Compass();
}
}
}

View File

@ -109,6 +109,7 @@ void Plane::init_ardupilot()
// initialise airspeed sensor
airspeed.init();
AP::compass().set_log_bit(MASK_LOG_COMPASS);
AP::compass().init();
#if OPTFLOW == ENABLED