Rover: move responsibility for logging into library

This commit is contained in:
Peter Barker 2019-03-25 23:42:43 +11:00 committed by Andrew Tridgell
parent bf23f1df67
commit 7de995aa3e
2 changed files with 1 additions and 4 deletions

View File

@ -23,10 +23,6 @@ void Rover::update_compass(void)
{
if (AP::compass().enabled() && compass.read()) {
ahrs.set_compass(&compass);
// update offsets
if (should_log(MASK_LOG_COMPASS)) {
logger.Write_Compass();
}
}
}

View File

@ -90,6 +90,7 @@ void Rover::init_ardupilot()
#endif
// initialise compass
AP::compass().set_log_bit(MASK_LOG_COMPASS);
AP::compass().init();
// initialise rangefinder