diff --git a/.vscode/settings.json b/.vscode/settings.json index 69aa100..6c7e3e2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,6 +15,7 @@ "*.d": "cpp", "*.html": "cpp", "*.tcc": "cpp", - "regex": "cpp" + "regex": "cpp", + "cstdlib": "cpp" } } \ No newline at end of file diff --git a/src/espmega_iot_core.cpp b/src/espmega_iot_core.cpp index 0ff5efc..e613732 100644 --- a/src/espmega_iot_core.cpp +++ b/src/espmega_iot_core.cpp @@ -423,6 +423,19 @@ void ota_begin() } } }); + otaserver.on("/lcd_update",HTTP_POST,[]() { + otaserver.sendHeader("Connection","close"); + },[](){ + HTTPUpload &upload = otaserver.upload(); + if(upload.status == UPLOAD_FILE_START) { + Serial.println(upload.totalSize); + } else if (upload.status == UPLOAD_FILE_WRITE) { + for(int i = 0; i