mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 05:36:37 +00:00
Update platform = espressif32
This commit is contained in:
parent
326c099c46
commit
b4594a4eca
@ -90,7 +90,7 @@ src_filter = +<*> -<.git/> -<examples/> -<test/> -<tests/> -<stm32f4/> -<lv_font
|
|||||||
; -- Platform specific build flags
|
; -- Platform specific build flags
|
||||||
[esp32]
|
[esp32]
|
||||||
framework = arduino
|
framework = arduino
|
||||||
platform = espressif32
|
platform = espressif32@^3.10006.210326
|
||||||
|
|
||||||
board_upload.flash_size=4MB
|
board_upload.flash_size=4MB
|
||||||
board_upload.maximum_size = 4194304
|
board_upload.maximum_size = 4194304
|
||||||
|
@ -900,14 +900,15 @@ void webHandleFirmwareUpload()
|
|||||||
// WiFiUDP::stopAll();
|
// WiFiUDP::stopAll();
|
||||||
|
|
||||||
int command = webServer.arg(F("cmd")).toInt();
|
int command = webServer.arg(F("cmd")).toInt();
|
||||||
size_t size;
|
size_t size = 0;
|
||||||
if(command == U_FLASH) {
|
if(command == U_FLASH) {
|
||||||
size = (ESP.getFreeSketchSpace() - 0x1000) & 0xFFFFF000;
|
size = (ESP.getFreeSketchSpace() - 0x1000) & 0xFFFFF000;
|
||||||
} else if(command == U_SPIFFS) {
|
} else if(command == U_SPIFFS) {
|
||||||
size = UPDATE_SIZE_UNKNOWN;
|
size = UPDATE_SIZE_UNKNOWN;
|
||||||
}
|
}
|
||||||
// if(!Update.begin(UPDATE_SIZE_UNKNOWN)) { // start with max available size
|
// if(!Update.begin(UPDATE_SIZE_UNKNOWN)) { // start with max available size
|
||||||
if(!Update.begin(size, command, -1, 0U, "spiffs")) { // start with max available size
|
const char label[] = "spiffs";
|
||||||
|
if(!Update.begin(size, command, -1, 0U, (const char*)label)) { // start with max available size
|
||||||
webUpdatePrintError();
|
webUpdatePrintError();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user