mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 11:46:31 +00:00
Update xdrv_01_webserver.ino
This commit is contained in:
parent
7e24ed9c2c
commit
42f25b1cfb
@ -2238,7 +2238,7 @@ void HandleUploadLoop(void)
|
|||||||
Update.end(); // End esp8266 update session
|
Update.end(); // End esp8266 update session
|
||||||
Web.upload_file_type = UPL_EFM8BB1;
|
Web.upload_file_type = UPL_EFM8BB1;
|
||||||
|
|
||||||
Web.upload_error = SnfBrUpdateInit();
|
Web.upload_error = SnfBrUpdateInit(); // 10, 11
|
||||||
if (Web.upload_error != 0) { return; }
|
if (Web.upload_error != 0) { return; }
|
||||||
} else
|
} else
|
||||||
#endif // USE_RF_FLASH
|
#endif // USE_RF_FLASH
|
||||||
@ -2246,7 +2246,7 @@ void HandleUploadLoop(void)
|
|||||||
if ((WEMOS == my_module_type) && (upload.buf[0] == ':')) { // Check if this is a ARDUINO SLAVE hex file
|
if ((WEMOS == my_module_type) && (upload.buf[0] == ':')) { // Check if this is a ARDUINO SLAVE hex file
|
||||||
Update.end(); // End esp8266 update session
|
Update.end(); // End esp8266 update session
|
||||||
Web.upload_file_type = UPL_TASMOTASLAVE;
|
Web.upload_file_type = UPL_TASMOTASLAVE;
|
||||||
Web.upload_error = TasmotaSlave_UpdateInit();
|
Web.upload_error = TasmotaSlave_UpdateInit(); // 0
|
||||||
if (Web.upload_error != 0) { return; }
|
if (Web.upload_error != 0) { return; }
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@ -2281,13 +2281,13 @@ void HandleUploadLoop(void)
|
|||||||
free(efm8bb1_update);
|
free(efm8bb1_update);
|
||||||
efm8bb1_update = nullptr;
|
efm8bb1_update = nullptr;
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
Web.upload_error = abs(result); // 2 = Not enough space, 8 = File invalid
|
Web.upload_error = abs(result); // 2 = Not enough space, 8 = File invalid, 12, 13
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ssize_t result = rf_search_and_write(upload.buf, upload.currentSize);
|
ssize_t result = rf_search_and_write(upload.buf, upload.currentSize);
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
Web.upload_error = abs(result);
|
Web.upload_error = abs(result); // 8, 12, 13
|
||||||
return;
|
return;
|
||||||
} else if (result > 0) {
|
} else if (result > 0) {
|
||||||
if ((size_t)result > upload.currentSize) {
|
if ((size_t)result > upload.currentSize) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user