From 4263c1a90c92fd086ae80b1ace15ca38ef7647b9 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 11 Sep 2017 21:28:04 +1000 Subject: [PATCH] DataFlash: file not being initialised means logging is failed --- libraries/DataFlash/DataFlash_File.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/DataFlash/DataFlash_File.cpp b/libraries/DataFlash/DataFlash_File.cpp index 3e296111b2..ed3fd20dc1 100644 --- a/libraries/DataFlash/DataFlash_File.cpp +++ b/libraries/DataFlash/DataFlash_File.cpp @@ -1194,6 +1194,9 @@ bool DataFlash_File::io_thread_alive() const bool DataFlash_File::logging_failed() const { + if (!_initialised) { + return true; + } if (_open_error) { return true; }