From 4a71749d1c7300088431ebab967d487cc17cd83e Mon Sep 17 00:00:00 2001 From: Frank Haverland Date: Wed, 31 Aug 2022 18:23:11 +0200 Subject: [PATCH 1/2] add test case for #921 (79.99996) --- .../jomjol-flowcontroll/test_flowpostprocessing.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/test/components/jomjol-flowcontroll/test_flowpostprocessing.cpp b/code/test/components/jomjol-flowcontroll/test_flowpostprocessing.cpp index cec5edbc..a1259591 100644 --- a/code/test/components/jomjol-flowcontroll/test_flowpostprocessing.cpp +++ b/code/test/components/jomjol-flowcontroll/test_flowpostprocessing.cpp @@ -166,6 +166,15 @@ void test_doFlow() { expected = "377988.4"; result = process_doFlow(analogs, digits); TEST_ASSERT_EQUAL_STRING(expected, result.c_str()); + + // Fehler bei V11.2.0 + // https://github.com/jomjol/AI-on-the-edge-device/issues/921#issuecomment-1233149877 + digits = { 0.0, 0.0, 7.0, 8.9}; // 79.9999(6) als falsches Ergebnis + analogs = { 0.1, 0.1, 0.1, 9.6}; + expected = "78.9999"; + result = process_doFlow(analogs, digits); + TEST_ASSERT_EQUAL_STRING(expected, result.c_str()); + } From 231ac5305fcd69a08b58b5ebef0a11e6fc01b5d8 Mon Sep 17 00:00:00 2001 From: Frank Haverland Date: Thu, 1 Sep 2022 21:11:45 +0200 Subject: [PATCH 2/2] fix html-upload #959 --- code/components/jomjol_fileserver_ota/server_ota.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/components/jomjol_fileserver_ota/server_ota.cpp b/code/components/jomjol_fileserver_ota/server_ota.cpp index c9b11b08..713836d5 100644 --- a/code/components/jomjol_fileserver_ota/server_ota.cpp +++ b/code/components/jomjol_fileserver_ota/server_ota.cpp @@ -349,11 +349,11 @@ esp_err_t handler_ota_update(httpd_req_t *req) std::string in, out, zw; in = "/sdcard/firmware/html.zip"; - out = "/sdcard/html/"; + out = "/sdcard/html"; delete_all_in_directory(out); - unzip(in, out); + unzip(in, out+"/"); zw = "HTML Update Successfull!

No reboot necessary"; httpd_resp_sendstr_chunk(req, zw.c_str()); httpd_resp_sendstr_chunk(req, NULL);