gmag11 / QuickESPNow

Wrapper for easy use of ESP-NOW on ESP32 and ESP8266
MIT License
93 stars 21 forks source link

Avoid WDT reset on queued messages (on ESP8266) #10

Closed blazoncek closed 7 months ago

blazoncek commented 7 months ago

With multiple messages queued espnowTxHandle() will enter while (!readyToSend) delay(1);which will trigger WDT reset. This fix (for #8) resolves that by breaking out of espnowTxHandle() and waiting for next timer interrupt to process outgoing messages.

I would also recommend to reduce TASK_PERIOD from 10ms to 5ms but that might need additional testing.