DataFlash: removed "no io thread heartbeat" msg

This commit is contained in:
Andrew Tridgell 2018-07-31 15:30:28 +10:00 committed by Peter Barker
parent baf869f8d6
commit 8b4b38bcb2

View File

@ -186,8 +186,10 @@ bool DataFlash_File::log_exists(const uint16_t lognum) const
void DataFlash_File::periodic_1Hz() void DataFlash_File::periodic_1Hz()
{ {
if (!io_thread_alive()) { if (!io_thread_alive()) {
if (io_thread_warning_decimation_counter == 0) { if (io_thread_warning_decimation_counter == 0 && _initialised) {
gcs().send_text(MAV_SEVERITY_CRITICAL, "No IO Thread Heartbeat (%s)", last_io_operation); // we don't print this error unless we did initialise. When _initialised is set to true
// we register the IO timer callback
gcs().send_text(MAV_SEVERITY_CRITICAL, "DataFlash: stuck thread (%s)", last_io_operation);
} }
if (io_thread_warning_decimation_counter++ > 57) { if (io_thread_warning_decimation_counter++ > 57) {
io_thread_warning_decimation_counter = 0; io_thread_warning_decimation_counter = 0;