Commit ef17fd9417d79e2c8203922ea9f81c2e9696595f
1 parent
adac3a6c
Added two times yield() for ESP8266 only
Showing
1 changed file
with
6 additions
and
0 deletions
src/EasyOpenTherm.cpp
| ... | ... | @@ -190,6 +190,9 @@ bool OpenTherm::_execute(OTDataLinkLayer & da |
| 190 | 190 | |
| 191 | 191 | uint32_t startMillis = millis(); |
| 192 | 192 | for(;;) { |
| 193 | +#if defined(ESP8266) | |
| 194 | + yield(); | |
| 195 | +#endif | |
| 193 | 196 | if(millis() - startMillis >= _timeoutMs) { |
| 194 | 197 | _lastError = ERROR_CODES::SEND_TIMEOUT; |
| 195 | 198 | |
| ... | ... | @@ -203,6 +206,9 @@ bool OpenTherm::_execute(OTDataLinkLayer & da |
| 203 | 206 | |
| 204 | 207 | startMillis = millis(); |
| 205 | 208 | for(;;) { |
| 209 | +#if defined(ESP8266) | |
| 210 | + yield(); | |
| 211 | +#endif | |
| 206 | 212 | if(millis() - startMillis >= _timeoutMs) { |
| 207 | 213 | _lastError = ERROR_CODES::RECEIVE_TIMEOUT; |
| 208 | 214 | _OTP->reset(); | ... | ... |