mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 12:36:52 +03:00
Improve log message when web UI is incomplete (#1716)
* improve warning if version.txt is missing * typo * show round duration in log Co-authored-by: CaCO3 <caco@ruinelli.ch>
This commit is contained in:
@@ -920,8 +920,7 @@ std::string unzip_new(std::string _in_zip_file, std::string _target_zip, std::st
|
|||||||
|
|
||||||
// Get and print information about each file in the archive.
|
// Get and print information about each file in the archive.
|
||||||
int numberoffiles = (int)mz_zip_reader_get_num_files(&zip_archive);
|
int numberoffiles = (int)mz_zip_reader_get_num_files(&zip_archive);
|
||||||
ESP_LOGI(TAG, "Numbers of files to be extrated: %d", numberoffiles);
|
ESP_LOGI(TAG, "Numbers of files to be extracted: %d", numberoffiles);
|
||||||
|
|
||||||
|
|
||||||
sort_iter = 0;
|
sort_iter = 0;
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -818,6 +818,7 @@ void task_autodoFlow(void *pvParameter)
|
|||||||
{
|
{
|
||||||
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "----------------------------------------------------------------"); // Clear separation between runs
|
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "----------------------------------------------------------------"); // Clear separation between runs
|
||||||
std::string _zw = "Round #" + std::to_string(++countRounds) + " started";
|
std::string _zw = "Round #" + std::to_string(++countRounds) + " started";
|
||||||
|
time_t roundStartTime = getUpTime();
|
||||||
LogFile.WriteToFile(ESP_LOG_INFO, TAG, _zw);
|
LogFile.WriteToFile(ESP_LOG_INFO, TAG, _zw);
|
||||||
fr_start = esp_timer_get_time();
|
fr_start = esp_timer_get_time();
|
||||||
|
|
||||||
@@ -848,7 +849,8 @@ void task_autodoFlow(void *pvParameter)
|
|||||||
string zwtemp = "CPU Temperature: " + stream.str();
|
string zwtemp = "CPU Temperature: " + stream.str();
|
||||||
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, zwtemp);
|
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, zwtemp);
|
||||||
|
|
||||||
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "Round #" + std::to_string(countRounds) + " completed");
|
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "Round #" + std::to_string(countRounds) +
|
||||||
|
" completed (" + std::to_string(getUpTime() - roundStartTime) + " seconds)");
|
||||||
|
|
||||||
fr_delta_ms = (esp_timer_get_time() - fr_start) / 1000;
|
fr_delta_ms = (esp_timer_get_time() - fr_start) / 1000;
|
||||||
if (auto_intervall > fr_delta_ms)
|
if (auto_intervall > fr_delta_ms)
|
||||||
|
|||||||
@@ -223,6 +223,7 @@ extern "C" void app_main(void)
|
|||||||
|
|
||||||
if (getHTMLcommit().substr(0, 7) != std::string(GIT_REV).substr(0, 7)) { // Compare the first 7 characters of both hashes
|
if (getHTMLcommit().substr(0, 7) != std::string(GIT_REV).substr(0, 7)) { // Compare the first 7 characters of both hashes
|
||||||
LogFile.WriteToFile(ESP_LOG_WARN, TAG, std::string("Web UI version (") + getHTMLcommit() + ") does not match firmware version (" + std::string(GIT_REV) + ") !");
|
LogFile.WriteToFile(ESP_LOG_WARN, TAG, std::string("Web UI version (") + getHTMLcommit() + ") does not match firmware version (" + std::string(GIT_REV) + ") !");
|
||||||
|
LogFile.WriteToFile(ESP_LOG_WARN, TAG, "Please make sure to setup the SD-Card properly (check the wiki) or re-install using the update_*.zip!");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string zw = getCurrentTimeString("%Y%m%d-%H%M%S");
|
std::string zw = getCurrentTimeString("%Y%m%d-%H%M%S");
|
||||||
|
|||||||
Reference in New Issue
Block a user