From 7de995aa3e22afaec1dd16adec98a9be38f47a5c Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 25 Mar 2019 23:42:43 +1100 Subject: [PATCH] Rover: move responsibility for logging into library --- APMrover2/sensors.cpp | 4 ---- APMrover2/system.cpp | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/APMrover2/sensors.cpp b/APMrover2/sensors.cpp index 200b3b7f24..717ef5ee45 100644 --- a/APMrover2/sensors.cpp +++ b/APMrover2/sensors.cpp @@ -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(); - } } } diff --git a/APMrover2/system.cpp b/APMrover2/system.cpp index b617cb3d64..e418dccc2e 100644 --- a/APMrover2/system.cpp +++ b/APMrover2/system.cpp @@ -90,6 +90,7 @@ void Rover::init_ardupilot() #endif // initialise compass + AP::compass().set_log_bit(MASK_LOG_COMPASS); AP::compass().init(); // initialise rangefinder