From 14a8bf3aec6e6d62f443861463d5f96e1275c918 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 25 Mar 2019 23:43:04 +1100 Subject: [PATCH] Plane: move responsibility for logging into library --- ArduPlane/ArduPlane.cpp | 3 --- ArduPlane/system.cpp | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ArduPlane/ArduPlane.cpp b/ArduPlane/ArduPlane.cpp index c76093160c..9facd665c0 100644 --- a/ArduPlane/ArduPlane.cpp +++ b/ArduPlane/ArduPlane.cpp @@ -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(); - } } } diff --git a/ArduPlane/system.cpp b/ArduPlane/system.cpp index b4eddfccb9..9e55b98d7b 100644 --- a/ArduPlane/system.cpp +++ b/ArduPlane/system.cpp @@ -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