Sub: move responsibility for logging into library

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

View File

@ -171,10 +171,6 @@ void Sub::update_batt_compass()
// update compass with throttle value - used for compassmot
compass.set_throttle(motors.get_throttle());
compass.read();
// log compass information
if (should_log(MASK_LOG_COMPASS) && !ahrs.have_ekf_logging()) {
logger.Write_Compass();
}
}
}

View File

@ -104,6 +104,7 @@ void Sub::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