Skip to content

Commit aab696b

Browse files
merge fix
1 parent 25cc630 commit aab696b

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

EmbUI/EmbUI.cpp

+1-11
Original file line numberDiff line numberDiff line change
@@ -325,16 +325,6 @@ void EmbUI::begin(){
325325
#endif
326326
LOG(printf_P, PSTR("Updating %s, file size:%u\n"), (type == U_FLASH)? F("Firmware") : F("Filesystem"), request->contentLength());
327327

328-
#ifdef ESP8266
329-
Update.runAsync(true);
330-
// TODO: разобраться почему под littlefs образ генерится чуть больше чем размер доступной памяти по константам
331-
size_t size = (type == U_FLASH)? request->contentLength() : (uintptr_t)&_FS_end - (uintptr_t)&_FS_start;
332-
#endif
333-
#ifdef ESP32
334-
size_t size = (type == U_FLASH)? request->contentLength() : UPDATE_SIZE_UNKNOWN;
335-
#endif
336-
LOG(printf_P, PSTR("Updating %s, file size:%u\n"), (type == U_FLASH)? F("Firmware") : F("Filesystem"), request->contentLength());
337-
338328
if (!Update.begin(size, type)) {
339329
Update.printError(Serial);
340330
}
@@ -351,7 +341,7 @@ void EmbUI::begin(){
351341
Update.printError(Serial);
352342
}
353343
}
354-
embui.uploadProgress(index + len, request->contentLength());
344+
uploadProgress(index + len, request->contentLength());
355345
});
356346

357347
//First request will return 0 results unless you start scan from somewhere else (loop/setup)

EmbUI/EmbUI.h

-5
Original file line numberDiff line numberDiff line change
@@ -316,11 +316,6 @@ class EmbUI
316316
callback_function_t _cb_STADisconnected = nullptr;
317317
callback_function_t _cb_STAGotIP = nullptr;
318318

319-
/*
320-
* OTA update progress, return upload %
321-
*/
322-
uint8_t uploadProgress(size_t len, size_t total);
323-
324319
#ifdef USE_SSDP
325320
void ssdp_begin() {
326321
String hn = param(FPSTR(P_hostname));

0 commit comments

Comments
 (0)