diff --git a/src/modules/logger/logger.cpp b/src/modules/logger/logger.cpp index 95b85e8879..65b1cf50c5 100644 --- a/src/modules/logger/logger.cpp +++ b/src/modules/logger/logger.cpp @@ -974,8 +974,6 @@ void Logger::run() } } - bool data_written = false; - /* Check if parameters have changed */ if (!_should_stop_file_log) { // do not record param changes after disarming parameter_update_s param_update; @@ -1017,8 +1015,6 @@ void Logger::run() #ifdef DBGPRINT total_bytes += msg_size; #endif /* DBGPRINT */ - - data_written = true; } // mission log @@ -1031,9 +1027,7 @@ void Logger::run() _mission_subscriptions[sub_idx].next_write_time = (loop_time / 100000) + delta_time / 100; } - if (write_message(LogType::Mission, _msg_buffer, msg_size)) { - data_written = true; - } + write_message(LogType::Mission, _msg_buffer, msg_size); } } } @@ -1094,10 +1088,8 @@ void Logger::run() /* release the log buffer */ _writer.unlock(); - /* notify the writer thread if data is available */ - if (data_written) { - _writer.notify(); - } + /* notify the writer thread */ + _writer.notify(); /* subscription update */ if (next_subscribe_topic_index != -1) {