1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

Merge pull request #532 from me-no-dev/esp8266

add synchronous ota
This commit is contained in:
Ivan Grokhotkov
2015-07-13 02:10:14 +03:00
5 changed files with 13 additions and 10 deletions

View File

@ -54,8 +54,11 @@ void loop() {
WiFiClient client;
if (client.connect(remote, port)) {
Serial.setDebugOutput(true);
while(!Update.isFinished()) Update.write(client);
uint32_t written;
while(!Update.isFinished()){
written = Update.write(client);
if(written > 0) client.print(written, DEC);
}
Serial.setDebugOutput(false);
if(Update.end()){