Uptime: %d d %02d:%02d:%02d
\ +\ +", BOARD_NAME, BOARD_NAME, day, hr % 24, min % 60, sec % 60); + + pageInput = temp; +} + +void handleNotFound(AsyncWebServerRequest *request) +{ + String message = "File Not Found\n\n"; + + message += "URI: "; + message += request->url(); + message += "\nMethod: "; + message += (request->method() == HTTP_GET) ? "GET" : "POST"; + message += "\nArguments: "; + message += request->args(); + message += "\n"; + + for (uint8_t i = 0; i < request->args(); i++) + { + message += " " + request->argName(i) + ": " + request->arg(i) + "\n"; + } + + request->send(404, "text/plain", message); +} + +String out; + +void handleRoot(AsyncWebServerRequest *request) +{ + char temp[70]; + + // clear the String to start over + out = String(); + + createPage(out); + + out += "\r\nINDEX | DATA |
---|---|
"; + out += String(lineIndex); + out += " | "; + out += "Portenta_H7_AsyncWebServer_SendChunked_ABCDEFGHIJKLMNOPQRSTUVWXYZ |
Uptime: %d d %02d:%02d:%02d
\ +\ +\ +", BOARD_NAME, BOARD_NAME, day, hr % 24, min % 60, sec % 60); + + request->send(200, "text/html", temp); + + digitalWrite(LED_BUILTIN, LED_OFF); +} + +void handleNotFound(AsyncWebServerRequest *request) +{ + digitalWrite(LED_BUILTIN, LED_ON); + + String message = "File Not Found\n\n"; + + message += "URI: "; + message += request->url(); + message += "\nMethod: "; + message += (request->method() == HTTP_GET) ? "GET" : "POST"; + message += "\nArguments: "; + message += request->args(); + message += "\n"; + + for (uint8_t i = 0; i < request->args(); i++) + { + message += " " + request->argName(i) + ": " + request->arg(i) + "\n"; + } + + request->send(404, "text/plain", message); + + digitalWrite(LED_BUILTIN, LED_OFF); +} + +String out; + +void drawGraph(AsyncWebServerRequest *request) +{ + char temp[70]; + + out = String(); + + out += "Uptime: %d d %02d:%02d:%02d
\ +\ +", BOARD_NAME, BOARD_NAME, day, hr % 24, min % 60, sec % 60); + + pageInput = temp; + + digitalWrite(LED_BUILTIN, LED_OFF); +} + +void handleNotFound(AsyncWebServerRequest *request) +{ + digitalWrite(LED_BUILTIN, LED_ON); + String message = "File Not Found\n\n"; + + message += "URI: "; + message += request->url(); + message += "\nMethod: "; + message += (request->method() == HTTP_GET) ? "GET" : "POST"; + message += "\nArguments: "; + message += request->args(); + message += "\n"; + + for (uint8_t i = 0; i < request->args(); i++) + { + message += " " + request->argName(i) + ": " + request->arg(i) + "\n"; + } + + request->send(404, "text/plain", message); + + digitalWrite(LED_BUILTIN, LED_OFF); +} + +String out; + +void handleRoot(AsyncWebServerRequest *request) +{ + // clear the String to start over + out = String(); + + digitalWrite(LED_BUILTIN, LED_ON); + + createPage(out); + + out += "\r\nINDEX | DATA |
---|---|
"; + out += String(lineIndex); + out += " | "; + out += "Portenta_H7_AsyncWebServer_SendChunked_ABCDEFGHIJKLMNOPQRSTUVWXYZ |
Uptime: %d d %02d:%02d:%02d
\ +\ +\ +", BOARD_NAME, BOARD_NAME, day, hr % 24, min % 60, sec % 60); + + request->send(200, "text/html", temp); + + digitalWrite(LED_BUILTIN, LED_OFF); +} + +void handleNotFound(AsyncWebServerRequest *request) +{ + digitalWrite(LED_BUILTIN, LED_ON); + String message = "File Not Found\n\n"; + + message += "URI: "; + message += request->url(); + message += "\nMethod: "; + message += (request->method() == HTTP_GET) ? "GET" : "POST"; + message += "\nArguments: "; + message += request->args(); + message += "\n"; + + for (uint8_t i = 0; i < request->args(); i++) + { + message += " " + request->argName(i) + ": " + request->arg(i) + "\n"; + } + + request->send(404, "text/plain", message); + digitalWrite(LED_BUILTIN, LED_OFF); +} + +String out; + +void drawGraph(AsyncWebServerRequest *request) +{ + //out.reserve(STRING_SIZE); + char temp[70]; + + digitalWrite(LED_BUILTIN, LED_ON); + + out = "