Update ElegantOTA from 3.1.5 -> 3.1.6

This commit is contained in:
Daniel Öster 2025-02-14 15:56:06 +02:00
parent 87050791ad
commit 15c54cb0a6
5 changed files with 350 additions and 11 deletions

View file

@ -19,11 +19,11 @@
{ {
"owner": "mathieucarbou", "owner": "mathieucarbou",
"name": "ESPAsyncWebServer", "name": "ESPAsyncWebServer",
"version": "^3.1.1", "version": "^3.3.11",
"platforms": ["espressif8266", "espressif32"] "platforms": ["espressif8266", "espressif32"]
} }
], ],
"version": "3.1.5", "version": "3.1.6",
"frameworks": "arduino", "frameworks": "arduino",
"platforms": ["espressif8266", "espressif32", "raspberrypi"], "platforms": ["espressif8266", "espressif32", "raspberrypi"],
"build": { "build": {

View file

@ -1,5 +1,5 @@
name=ElegantOTA name=ElegantOTA
version=3.1.5 version=3.1.6
author=Ayush Sharma author=Ayush Sharma
category=Communication category=Communication
maintainer=Ayush Sharma <asrocks5@gmail.com> maintainer=Ayush Sharma <asrocks5@gmail.com>

View file

@ -43,9 +43,6 @@ void ElegantOTAClass::begin(ELEGANTOTA_WEBSERVER *server, const char * username,
return request->requestAuthentication(); return request->requestAuthentication();
} }
// Pre-OTA update callback
if (preUpdateCallback != NULL) preUpdateCallback();
// Get header x-ota-mode value, if present // Get header x-ota-mode value, if present
OTA_Mode mode = OTA_MODE_FIRMWARE; OTA_Mode mode = OTA_MODE_FIRMWARE;
// Get mode from arg // Get mode from arg
@ -76,7 +73,7 @@ void ElegantOTAClass::begin(ELEGANTOTA_WEBSERVER *server, const char * username,
#endif #endif
// Pre-OTA update callback // Pre-OTA update callback
//if (preUpdateCallback != NULL) preUpdateCallback(); if (preUpdateCallback != NULL) preUpdateCallback();
// Start update process // Start update process
#if defined(ESP8266) #if defined(ESP8266)
@ -179,9 +176,9 @@ void ElegantOTAClass::begin(ELEGANTOTA_WEBSERVER *server, const char * username,
update_size = ((size_t)&_FS_end - (size_t)&_FS_start); update_size = ((size_t)&_FS_end - (size_t)&_FS_start);
LittleFS.end(); LittleFS.end();
} else { } else {
FSInfo64 i; FSInfo i;
LittleFS.begin(); LittleFS.begin();
LittleFS.info64(i); LittleFS.info(i);
update_size = i.totalBytes - i.usedBytes; update_size = i.totalBytes - i.usedBytes;
} }
// Start update process // Start update process

File diff suppressed because one or more lines are too long

View file

@ -3,6 +3,6 @@
#include <Arduino.h> #include <Arduino.h>
extern const uint8_t ELEGANT_HTML[41354]; extern const uint8_t ELEGANT_HTML[10214];
#endif #endif