8266 hotfix: solving connectivity problems
* it seems that `WiFiUDP.flsuh()` does something completely different from 8266, and its actually causing WLED to stall on UI calls. So not usable on 8266. * fixing a few compiler warnings about "comparing signed and unsigned" NB: its a hotfix, we have to check if there are other problems on 8266. Also its definitely ugly, but it helps as a band aid.
This commit is contained in:
@@ -226,9 +226,15 @@ void sendNTPPacket()
|
||||
|
||||
bool checkNTPResponse()
|
||||
{
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
ntpUdp.flush();
|
||||
#endif
|
||||
int cb = ntpUdp.parsePacket();
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
if (!cb) {ntpUdp.flush(); return false;} // WLEDMM flush buffer
|
||||
#else
|
||||
if (!cb) {return false;} // WLEDMM do not flush buffer
|
||||
#endif
|
||||
|
||||
uint32_t ntpPacketReceivedTime = millis();
|
||||
DEBUG_PRINT(F("NTP recv, l="));
|
||||
|
||||
Reference in New Issue
Block a user