diff --git a/code/components/jomjol_tfliteclass/server_tflite.cpp b/code/components/jomjol_tfliteclass/server_tflite.cpp index df17f049..77caa32b 100644 --- a/code/components/jomjol_tfliteclass/server_tflite.cpp +++ b/code/components/jomjol_tfliteclass/server_tflite.cpp @@ -662,8 +662,6 @@ esp_err_t handler_uptime(httpd_req_t *req) #ifdef DEBUG_DETAIL_ON LogFile.WriteHeapInfo("handler_uptime - Start"); #endif - - const char* resp_str; std::string formatedUptime = getFormatedUptime(false); @@ -680,9 +678,6 @@ esp_err_t handler_uptime(httpd_req_t *req) } - - - esp_err_t handler_prevalue(httpd_req_t *req) { #ifdef DEBUG_DETAIL_ON diff --git a/code/main/server_main.cpp b/code/main/server_main.cpp index 21436b81..39763e70 100644 --- a/code/main/server_main.cpp +++ b/code/main/server_main.cpp @@ -128,6 +128,14 @@ esp_err_t info_get_handler(httpd_req_t *req) httpd_resp_sendstr_chunk(req, NULL); return ESP_OK; } + else if (_task.compare("Round") == 0) + { + char formated[10] = ""; + snprintf(formated, sizeof(formated), "%d", getCountFlowRounds()); + httpd_resp_sendstr_chunk(req, formated); + httpd_resp_sendstr_chunk(req, NULL); + return ESP_OK; + } else if (_task.compare("SDCardPartitionSize") == 0) { std::string zw; diff --git a/sd-card/html/overview.html b/sd-card/html/overview.html index f382410b..0b313aa9 100644 --- a/sd-card/html/overview.html +++ b/sd-card/html/overview.html @@ -9,7 +9,7 @@ .tg {border-collapse:collapse;border-spacing:0;width:100%;color: darkslategray;border: inset;height:585px;} .tg td{font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg th{height: 50px;font-size:24px;font-weight:bold;text-align:left;padding:0px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;background-color:#f0f0f0} -.tg .tg-1{width:77%;font-size:20px;font-family:Arial, Helvetica, sans-serif !important;border: inset;} +.tg .tg-1{width:700px;font-size:20px;font-family:Arial, Helvetica, sans-serif !important;border: inset;} .tg .tg-2{font-size:20px;font-family:Arial, Helvetica, sans-serif !important;border: inset;} .tg .tg-3{height: 15px;font-size:14px;font-family:Arial, Helvetica, sans-serif !important;border: inset;} @@ -60,6 +60,7 @@
+ @@ -89,6 +90,7 @@ function addZero(i) { loadCPUTemp(); loadRSSI(); loadUptime(); + loadRoundCounter(); refresh(); }); @@ -164,6 +166,19 @@ function refresh() { xhttp.open("GET", url, true); xhttp.send(); } + + function loadRoundCounter() { + url = basepath + '/info?type=Round'; + var xhttp = new XMLHttpRequest(); + xhttp.onreadystatechange = function() { + if (this.readyState == 4 && this.status == 200) { + var _rsp = xhttp.responseText; + $('#round').html("(Round: " + _rsp + ")"); + } + } + xhttp.open("GET", url, true); + xhttp.send(); + } function loadValue(_type, _div, _style) { url = basepath + '/value?all=true&type=' + _type; @@ -215,6 +230,7 @@ function refresh() { loadCPUTemp(); loadRSSI(); loadUptime(); + loadRoundCounter(); } init();