From ef17fd9417d79e2c8203922ea9f81c2e9696595f Mon Sep 17 00:00:00 2001 From: Jeroen88 Date: Fri, 6 Jan 2023 13:02:28 +0100 Subject: [PATCH] Added two times yield() for ESP8266 only --- src/EasyOpenTherm.cpp | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) diff --git a/src/EasyOpenTherm.cpp b/src/EasyOpenTherm.cpp index b0b4439..829e3b5 100644 --- a/src/EasyOpenTherm.cpp +++ b/src/EasyOpenTherm.cpp @@ -190,6 +190,9 @@ bool OpenTherm::_execute(OTDataLinkLayer & da uint32_t startMillis = millis(); for(;;) { +#if defined(ESP8266) + yield(); +#endif if(millis() - startMillis >= _timeoutMs) { _lastError = ERROR_CODES::SEND_TIMEOUT; @@ -203,6 +206,9 @@ bool OpenTherm::_execute(OTDataLinkLayer & da startMillis = millis(); for(;;) { +#if defined(ESP8266) + yield(); +#endif if(millis() - startMillis >= _timeoutMs) { _lastError = ERROR_CODES::RECEIVE_TIMEOUT; _OTP->reset(); -- libgit2 0.21.4