Arduino v7

This commit is contained in:
Proddy
2024-01-04 23:43:30 +01:00
parent 13a915e1f4
commit af237c4fc0
213 changed files with 3900 additions and 4479 deletions

View File

@@ -52,7 +52,7 @@ void UploadFileService::handleUpload(AsyncWebServerRequest * request, const Stri
if (is_firmware) {
// Check firmware header, 0xE9 magic offset 0 indicates esp bin, chip offset 12: esp32:0, S2:2, C3:5
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
if (len > 12 && (data[0] != 0xE9 || data[12] != 0)) {
handleError(request, 503); // service unavailable
return;
@@ -81,7 +81,7 @@ void UploadFileService::handleUpload(AsyncWebServerRequest * request, const Stri
}
request->onDisconnect(UploadFileService::handleEarlyDisconnect); // success, let's make sure we end the update if the client hangs up
} else {
handleError(request, 507); // failed to begin, send an error response Insufficient Storage
handleError(request, 507); // failed to begin, send an error response Insufficient Storage
return;
}
} else {
@@ -133,7 +133,7 @@ void UploadFileService::uploadComplete(AsyncWebServerRequest * request) {
}
if (strlen(md5) == 32) {
auto * response = new AsyncJsonResponse(false, 256);
auto * response = new AsyncJsonResponse(false);
JsonObject root = response->getRoot();
root["md5"] = md5;
response->setLength();