mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-29 05:21:37 +03:00
inlining and enchancements
This commit is contained in:
committed by
Ivan Grokhotkov
parent
0d969e9760
commit
7596ed0742
@ -28,6 +28,7 @@ void setup(void){
|
||||
HTTPUpload& upload = server.upload();
|
||||
if(upload.status == UPLOAD_FILE_START){
|
||||
Serial.setDebugOutput(true);
|
||||
WiFiUDP::stopAll();
|
||||
Serial.printf("Update: %s\n", upload.filename.c_str());
|
||||
uint32_t maxSketchSpace = ((ESP.getFreeSketchSpace() + ESP.getSketchSize()) / 2) & 0xFFFFF000;
|
||||
if(!Update.begin(maxSketchSpace)){//start with max available size
|
||||
|
@ -43,7 +43,9 @@ void loop() {
|
||||
Serial.print(remote);
|
||||
Serial.printf(", port:%d, size:%d\n", port, size);
|
||||
uint32_t startTime = millis();
|
||||
|
||||
|
||||
WiFiUDP::stopAll();
|
||||
|
||||
if(!Update.begin(size)){
|
||||
Serial.println("Update Begin Error");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user