|
|
@@ -671,7 +671,8 @@ esp_err_t handler_wasserzaehler(httpd_req_t *req)
|
|
|
if (query.find("full") != std::string::npos)
|
|
|
{
|
|
|
std::string txt;
|
|
|
- txt = "<body style=\"font-family: arial\">";
|
|
|
+ httpd_resp_set_type(req, "text/html; charset=utf-8");
|
|
|
+ txt = "<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"UTF-8\"></head><body style=\"font-family: arial\">";
|
|
|
|
|
|
if ((countRounds <= 1) && (status != std::string("Flow finished")))
|
|
|
{
|
|
|
@@ -686,6 +687,11 @@ esp_err_t handler_wasserzaehler(httpd_req_t *req)
|
|
|
httpd_resp_sendstr_chunk(req, txt.c_str());
|
|
|
}
|
|
|
|
|
|
+ if (query.find("full") == std::string::npos)
|
|
|
+ {
|
|
|
+ httpd_resp_set_type(req, "text/plain");
|
|
|
+ }
|
|
|
+
|
|
|
zw = flowctrl.getReadout(_rawValue, _noerror, 0);
|
|
|
|
|
|
if (zw.length() > 0)
|
|
|
@@ -705,8 +711,7 @@ esp_err_t handler_wasserzaehler(httpd_req_t *req)
|
|
|
else
|
|
|
{
|
|
|
/* Digit ROIs */
|
|
|
- txt = "<body style=\"font-family: arial\">";
|
|
|
- txt += "<hr><h3>Recognized Digit ROIs (previous round)</h3>\n";
|
|
|
+ txt = "<hr><h3>Recognized Digit ROIs (previous round)</h3>\n";
|
|
|
txt += "<table style=\"border-spacing: 5px\"><tr style=\"text-align: center; vertical-align: top;\">\n";
|
|
|
|
|
|
std::vector<HTMLInfo *> htmlinfodig;
|
|
|
@@ -796,6 +801,11 @@ esp_err_t handler_wasserzaehler(httpd_req_t *req)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (query.find("full") != std::string::npos)
|
|
|
+ {
|
|
|
+ httpd_resp_sendstr_chunk(req, "</body></html>");
|
|
|
+ }
|
|
|
+
|
|
|
/* Respond with an empty chunk to signal HTTP response completion */
|
|
|
httpd_resp_sendstr_chunk(req, NULL);
|
|
|
}
|