Copter: move responsibility for logging into library

This commit is contained in:
Peter Barker 2019-03-25 23:42:58 +11:00 committed by Andrew Tridgell
parent 89f43c0318
commit 5d996a289a
2 changed files with 1 additions and 4 deletions

View File

@ -310,10 +310,6 @@ void Copter::update_batt_compass(void)
compass.set_throttle(motors->get_throttle());
compass.set_voltage(battery.voltage());
compass.read();
// log compass information
if (should_log(MASK_LOG_COMPASS) && !ahrs.have_ekf_logging()) {
logger.Write_Compass();
}
}
}

View File

@ -137,6 +137,7 @@ void Copter::init_ardupilot()
gps.set_log_gps_bit(MASK_LOG_GPS);
gps.init(serial_manager);
AP::compass().set_log_bit(MASK_LOG_COMPASS);
AP::compass().init();
#if OPTFLOW == ENABLED