# HG changeset patch # User Michiel Broek # Date 1562081512 -7200 # Node ID 6c5211c0120bd424f79d0cbf92f9b9c13299b1af # Parent 756d1a63d12975e7936e268775caed40ab091079 Version 0.3.3. Added favicon.ico to the web server. Fixed text position in the http client for the power percentage. Silenced a lot of log messages. Moved the pump led on the display to the left just as on the web page. diff -r 756d1a63d129 -r 6c5211c0120b Makefile --- a/Makefile Tue Jul 02 12:10:23 2019 +0200 +++ b/Makefile Tue Jul 02 17:31:52 2019 +0200 @@ -3,7 +3,7 @@ # project subdirectory. # -PROJECT_VER := "0.3.2" +PROJECT_VER := "0.3.3" PROJECT_NAME := brewboard include $(IDF_PATH)/make/project.mk diff -r 756d1a63d129 -r 6c5211c0120b image/files.list --- a/image/files.list Tue Jul 02 12:10:23 2019 +0200 +++ b/image/files.list Tue Jul 02 17:31:52 2019 +0200 @@ -13,3 +13,4 @@ w/index.html.gz w/logs.html w/webui.html +w/favicon.ico diff -r 756d1a63d129 -r 6c5211c0120b image/version.txt --- a/image/version.txt Tue Jul 02 12:10:23 2019 +0200 +++ b/image/version.txt Tue Jul 02 17:31:52 2019 +0200 @@ -1,1 +1,1 @@ -0.1.cq +0.3.3 diff -r 756d1a63d129 -r 6c5211c0120b image/w/favicon.ico Binary file image/w/favicon.ico has changed diff -r 756d1a63d129 -r 6c5211c0120b image/w/webui.html --- a/image/w/webui.html Tue Jul 02 12:10:23 2019 +0200 +++ b/image/w/webui.html Tue Jul 02 17:31:52 2019 +0200 @@ -87,8 +87,8 @@ --- - 44.00 - 100% + 44.00 + 100% diff -r 756d1a63d129 -r 6c5211c0120b main/config.c --- a/main/config.c Tue Jul 02 12:10:23 2019 +0200 +++ b/main/config.c Tue Jul 02 17:31:52 2019 +0200 @@ -19,7 +19,11 @@ size_t bytes = fwrite(dst, 1, sizeof(config), f); fclose(f); - ESP_LOGI(TAG, "/spiffs/etc/config.conf written %d bytes", bytes); + if (bytes != sizeof(config)) { + ESP_LOGE(TAG, "/spiffs/etc/config.conf written %d/%d bytes", bytes, sizeof(config)); + } else { + ESP_LOGD(TAG, "/spiffs/etc/config.conf written %d bytes", bytes); + } } @@ -58,7 +62,7 @@ dst = (uint8_t*)&config; size_t bytes = fread(dst, 1, sizeof(config), f); fclose(f); - ESP_LOGI(TAG, "/spiffs/etc/config.conf read %d bytes", bytes); + ESP_LOGD(TAG, "/spiffs/etc/config.conf read %d bytes", bytes); if (config.AskIodine && ! config.IodineTime) { config.IodineTime = 30; write_config(); @@ -123,14 +127,14 @@ size_t bytes = fread(dst, 1, sizeof(equipment), f); if (bytes && equipment.Record == RecNo) { fclose(f); - ESP_LOGI(TAG, "/spiffs/etc/equipments.conf read %d bytes, record %d: %s", bytes, RecNo, equipment.Name); + ESP_LOGD(TAG, "/spiffs/etc/equipments.conf read %d bytes, record %d: %s", bytes, RecNo, equipment.Name); return; } if (bytes == 0) break; } fclose(f); - ESP_LOGI(TAG, "/spiffs/etc/equipments.conf read error, record %d not found", RecNo); + ESP_LOGE(TAG, "/spiffs/etc/equipments.conf read error, record %d not found", RecNo); } } @@ -335,7 +339,11 @@ size_t bytes = fwrite(dst, 1, sizeof(runtime), f); fclose(f); - ESP_LOGD(TAG, "/spiffs/etc/runtime.conf written %d bytes", bytes); + if (bytes != sizeof(runtime)) { + ESP_LOGE(TAG, "/spiffs/etc/runtime.conf written %d/%d bytes", bytes, sizeof(runtime)); + } else { + ESP_LOGD(TAG, "/spiffs/etc/runtime.conf written %d bytes", bytes); + } } @@ -363,7 +371,9 @@ dst = (uint8_t*)&runtime; size_t bytes = fread(dst, 1, sizeof(runtime), f); fclose(f); - ESP_LOGI(TAG, "/spiffs/etc/runtime.conf read %d bytes", bytes); + if (bytes != sizeof(runtime)) { + ESP_LOGE(TAG, "/spiffs/etc/runtime.conf read %d/%d bytes", bytes, sizeof(runtime)); + } #if 0 printf("Auto started %s\n", runtime.AutoModeStarted ? "yes":"no"); printf("Stage resume %d\n", runtime.StageResume); @@ -408,7 +418,9 @@ fseek(f, (RecNo - 1) * sizeof(recipe), SEEK_SET); size_t bytes = fwrite(dst, 1, sizeof(recipe), f); fclose(f); - ESP_LOGI(TAG, "/spiffs/etc/recipe.conf written record %d, %d bytes", RecNo, bytes); + if (bytes != sizeof(recipe)) { + ESP_LOGE(TAG, "/spiffs/etc/recipe.conf write record %d, %d/%d bytes", RecNo, bytes, sizeof(recipe)); + } } @@ -461,7 +473,9 @@ fseek(f, (RecNo - 1) * sizeof(recipe), SEEK_SET); size_t bytes = fread(dst, 1, sizeof(recipe), f); fclose(f); - ESP_LOGI(TAG, "/spiffs/etc/recipe.conf read record %d, %d bytes", RecNo, bytes); + if (bytes != sizeof(recipe)) { + ESP_LOGE(TAG, "/spiffs/etc/recipe.conf read record %d, %d/%d bytes", RecNo, bytes, sizeof(recipe)); + } } } diff -r 756d1a63d129 -r 6c5211c0120b main/task_tft.c --- a/main/task_tft.c Tue Jul 02 12:10:23 2019 +0200 +++ b/main/task_tft.c Tue Jul 02 17:31:52 2019 +0200 @@ -297,9 +297,9 @@ cpump = (Pump_pin) ? true : false; if ((cpump != lpump) || (! update)) { if (cpump) { - TFT_fillCircle(x + 146, y + 11, 8, _pump); + TFT_fillCircle(x + 11, y + 11, 8, _pump); } else { - TFT_fillCircle(x + 146, y + 11, 8, _bg); + TFT_fillCircle(x + 11, y + 11, 8, _bg); } lpump = cpump; snprintf(msg, 95, "{\"pump_led\":\"%s\"}", cpump ? "1":"0"); @@ -530,7 +530,7 @@ snprintf(msg, 95, "{\"main\":\"%d\",\"sub\":\"%d\",\"timer\":\"\"}", Main_Screen, Sub_Screen); ws_server_send_text_clients((char *)"/ws", msg, strlen(msg)); - ESP_LOGI(TAG, "Change screen %d to %d", Old_Screen, Main_Screen); + ESP_LOGD(TAG, "Change screen %d to %d", Old_Screen, Main_Screen); _bg = TFT_BLACK; TFT_fillScreen(_bg); TFT_resetclipwin();