Tue, 02 Jul 2019 17:31:52 +0200
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.
Makefile | file | annotate | diff | comparison | revisions | |
image/files.list | file | annotate | diff | comparison | revisions | |
image/version.txt | file | annotate | diff | comparison | revisions | |
image/w/favicon.ico | file | annotate | diff | comparison | revisions | |
image/w/webui.html | file | annotate | diff | comparison | revisions | |
main/config.c | file | annotate | diff | comparison | revisions | |
main/task_tft.c | file | annotate | diff | comparison | revisions |
--- 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
--- 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
--- 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
--- 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 @@ <td colspan="4" style='border: 1px solid; font-size: 40px; text-align: right;'><span id="hlt_pv">---</span></td> </tr> <tr> - <td colspan="2" style='font-size: 10px;'><span id="hlt_sp">44.00</span></td> - <td colspan="2" style='font-size: 10px;'><span id="hlt_power">100%</span></td> + <td colspan="2" style='width: 50%; font-size: 10px;'><span id="hlt_sp">44.00</span></td> + <td colspan="2" style='width: 50%; font-size: 10px;'><span id="hlt_power">100%</span></td> </tr> </table> </td>
--- 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)); + } } }
--- 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();