From c9a4119ee93e3b05b56e339bccfacfb5ee7d12d6 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 9 Jun 2017 12:33:54 +1000 Subject: [PATCH] Sub: eliminate calls to manipulate _writes_enabled --- ArduSub/Log.cpp | 3 --- ArduSub/motors.cpp | 6 ------ 2 files changed, 9 deletions(-) diff --git a/ArduSub/Log.cpp b/ArduSub/Log.cpp index 87b5d035bf..b851b0e4ed 100644 --- a/ArduSub/Log.cpp +++ b/ArduSub/Log.cpp @@ -482,9 +482,6 @@ void Sub::start_logging() if (!DataFlash.logging_started()) { DataFlash.StartNewLog(); } - - // enable writes - DataFlash.EnableWrites(true); } void Sub::log_init(void) diff --git a/ArduSub/motors.cpp b/ArduSub/motors.cpp index 5d145f2d39..b9e7a73e3b 100644 --- a/ArduSub/motors.cpp +++ b/ArduSub/motors.cpp @@ -120,12 +120,6 @@ void Sub::init_disarm_motors() DataFlash_Class::instance()->set_vehicle_armed(false); - if (DataFlash.log_while_disarmed()) { - start_logging(); // create a new log if necessary - } else { - DataFlash.EnableWrites(false); // suspend logging - } - // disable gps velocity based centrefugal force compensation ahrs.set_correct_centrifugal(false); hal.util->set_soft_armed(false);