From 6016c7300b215044146902dc729d4fffca30fdbb Mon Sep 17 00:00:00 2001 From: Stefan Mertl Date: Wed, 31 Jan 2018 18:52:53 +0100 Subject: [PATCH] Another try to write the size of the used files to the LCD. --- software/c++/ruwaicom/src/root.cpp | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/software/c++/ruwaicom/src/root.cpp b/software/c++/ruwaicom/src/root.cpp index a171aaf..8c42427 100644 --- a/software/c++/ruwaicom/src/root.cpp +++ b/software/c++/ruwaicom/src/root.cpp @@ -733,7 +733,7 @@ Root::lcd_status(void) ms_hptime2isotimestr(last_timestamp.time, c_time_string, true); time_string = std::string(c_time_string); display->print(time_string.substr(0, 10), time_string.substr(11)); - std::this_thread::sleep_for(std::chrono::seconds(3)); + std::this_thread::sleep_for(std::chrono::seconds(4)); stream << "GPS F:" << last_timestamp.gps_fix << " OK:" << last_timestamp.gps_fix_ok; @@ -742,9 +742,24 @@ Root::lcd_status(void) stream << "SLTS:" << last_timestamp.sec_slts; msg2 = stream.str(); display->print(msg1, msg2); - std::this_thread::sleep_for(std::chrono::seconds(3)); + std::this_thread::sleep_for(std::chrono::seconds(4)); + std::vector tmp_file_size(recorder->tmp_file_size); + stream.str(""); + stream << tmp_file_size.size() << " files"; + msg1 = stream.str(); + + stream.str(""); + for (unsigned int k = 0; k < tmp_file_size.size(); k++) + { + stream << recorder->tmp_file_size[k] << "; "; + } + msg2 = stream.str(); + display->print(msg1, msg2); + std::this_thread::sleep_for(std::chrono::seconds(4)); + + /* TODO: Getting the file size is blocking the program somehow. std::string tmp_dir = recorder->get_tmp_dir(); std::vector rec_files = get_file_list(tmp_dir); std::sort(rec_files.begin(), rec_files.end()); @@ -760,8 +775,7 @@ Root::lcd_status(void) } msg2 = stream.str(); stream.str(""); - - std::this_thread::sleep_for(std::chrono::seconds(10)); + */ } } -- 2.11.4.GIT