mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-09 13:06:54 +03:00
Merge pull request #966 from haverland/rolling
Fix for html upload #959 and new test case for #921
This commit is contained in:
@@ -349,11 +349,11 @@ esp_err_t handler_ota_update(httpd_req_t *req)
|
|||||||
std::string in, out, zw;
|
std::string in, out, zw;
|
||||||
|
|
||||||
in = "/sdcard/firmware/html.zip";
|
in = "/sdcard/firmware/html.zip";
|
||||||
out = "/sdcard/html/";
|
out = "/sdcard/html";
|
||||||
|
|
||||||
delete_all_in_directory(out);
|
delete_all_in_directory(out);
|
||||||
|
|
||||||
unzip(in, out);
|
unzip(in, out+"/");
|
||||||
zw = "HTML Update Successfull!<br><br>No reboot necessary";
|
zw = "HTML Update Successfull!<br><br>No reboot necessary";
|
||||||
httpd_resp_sendstr_chunk(req, zw.c_str());
|
httpd_resp_sendstr_chunk(req, zw.c_str());
|
||||||
httpd_resp_sendstr_chunk(req, NULL);
|
httpd_resp_sendstr_chunk(req, NULL);
|
||||||
|
|||||||
@@ -166,6 +166,15 @@ void test_doFlow() {
|
|||||||
expected = "377988.4";
|
expected = "377988.4";
|
||||||
result = process_doFlow(analogs, digits);
|
result = process_doFlow(analogs, digits);
|
||||||
TEST_ASSERT_EQUAL_STRING(expected, result.c_str());
|
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());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user