Skip to content

Commit 9407952

Browse files
committed
Add yield to the parse loop
This is to avoid famishin the WiFi stack. Fixes #131
1 parent f973aff commit 9407952

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
"espressif8266",
1616
"espressif32"
1717
],
18-
"version": "1.6.1"
18+
"version": "1.6.2"
1919
}

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ESP8266 Weather Station
2-
version=1.6.1
2+
version=1.6.2
33
author=ThingPulse
44
maintainer=ThingPulse <[email protected]>
55
sentence=ESP8266 based internet connected Weather Station

src/OpenWeatherMapCurrent.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ void OpenWeatherMapCurrent::doUpdate(OpenWeatherMapCurrentData *data, String url
8080
if (isBody) {
8181
parser.parse(c);
8282
}
83+
// give WiFi and TCP/IP libraries a chance to handle pending events
84+
yield();
8385
}
8486
}
8587
}

src/OpenWeatherMapForecast.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ uint8_t OpenWeatherMapForecast::doUpdate(OpenWeatherMapForecastData *data, Strin
8383
if (isBody) {
8484
parser.parse(c);
8585
}
86+
// give WiFi and TCP/IP libraries a chance to handle pending events
87+
yield();
8688
}
8789
}
8890
}

0 commit comments

Comments
 (0)