From 3c3fee6e38b2792cc7ac90d83e0bef20b2057221 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 9 Jun 2017 15:45:23 +1000 Subject: [PATCH] Sub: StartUnstartedLogging replaces logging_started/start_logging --- ArduSub/Log.cpp | 4 +--- ArduSub/system.cpp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ArduSub/Log.cpp b/ArduSub/Log.cpp index b851b0e4eddd8..66b0cecc0d79c 100644 --- a/ArduSub/Log.cpp +++ b/ArduSub/Log.cpp @@ -479,9 +479,7 @@ void Sub::start_logging() // dataflash may have stopped logging - when we get_log_data, // for example. Always try to restart: - if (!DataFlash.logging_started()) { - DataFlash.StartNewLog(); - } + DataFlash.StartUnstartedLogging(); } void Sub::log_init(void) diff --git a/ArduSub/system.cpp b/ArduSub/system.cpp index d0c1969a4cc8d..5f51c1bd63352 100644 --- a/ArduSub/system.cpp +++ b/ArduSub/system.cpp @@ -300,9 +300,7 @@ bool Sub::should_log(uint32_t mask) if (!motors.armed() && !DataFlash.log_while_disarmed()) { return false; } - if (!DataFlash.logging_started()) { - start_logging(); - } + start_logging(); return true; #else return false;