From dc292475ac0e49d211655de7545aa1d13c4d6cd9 Mon Sep 17 00:00:00 2001 From: Stefan Mertl Date: Wed, 31 Jan 2018 19:08:15 +0100 Subject: [PATCH] Write the file size for each file to make shure, that the values are readable on the LCD: --- software/c++/ruwaicom/src/root.cpp | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/software/c++/ruwaicom/src/root.cpp b/software/c++/ruwaicom/src/root.cpp index 8c42427..00bb561 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(4)); + std::this_thread::sleep_for(std::chrono::seconds(5)); stream << "GPS F:" << last_timestamp.gps_fix << " OK:" << last_timestamp.gps_fix_ok; @@ -742,22 +742,33 @@ 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(4)); + std::this_thread::sleep_for(std::chrono::seconds(5)); std::vector tmp_file_size(recorder->tmp_file_size); stream.str(""); - stream << tmp_file_size.size() << " files"; + stream << "Recording"; msg1 = stream.str(); stream.str(""); + stream << tmp_file_size.size() << " files"; + msg2 = stream.str(); + display->print(msg1, msg2); + std::this_thread::sleep_for(std::chrono::seconds(2)); + + for (unsigned int k = 0; k < tmp_file_size.size(); k++) { - stream << recorder->tmp_file_size[k] << "; "; + stream.str(""); + stream << "Size file " << k; + msg1 = stream.str(); + + stream.str(""); + stream << recorder->tmp_file_size[k] << "kB"; + msg2 = stream.str(); + display->print(msg1, msg2); + std::this_thread::sleep_for(std::chrono::seconds(2)); } - 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(); -- 2.11.4.GIT