From aae9dc55e34889f1ce2a6487553dcec391225822 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 25 Mar 2019 23:43:12 +1100 Subject: [PATCH] Sub: move responsibility for logging into library --- ArduSub/ArduSub.cpp | 4 ---- ArduSub/system.cpp | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/ArduSub/ArduSub.cpp b/ArduSub/ArduSub.cpp index 5115f4da7e..092ca68cd9 100644 --- a/ArduSub/ArduSub.cpp +++ b/ArduSub/ArduSub.cpp @@ -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(); - } } } diff --git a/ArduSub/system.cpp b/ArduSub/system.cpp index 77bbf31f5b..4fbc14732b 100644 --- a/ArduSub/system.cpp +++ b/ArduSub/system.cpp @@ -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