Merge remote-tracking branch 'origin/develop'

This commit is contained in:
Ben Meadors
2026-03-06 10:48:51 -06:00
60 changed files with 1443 additions and 164 deletions
+5 -2
View File
@@ -33,7 +33,10 @@ bool AsyncUDP::writeTo(const uint8_t *data, size_t len, IPAddress ip, uint16_t p
if (!udp.beginPacket(ip, port))
return false;
udp.write(data, len);
return udp.endPacket();
isSending = true;
bool ok = udp.endPacket();
isSending = false;
return ok;
}
void AsyncUDP::close()
@@ -70,7 +73,7 @@ const uint8_t *AsyncUDPPacket::data()
int32_t AsyncUDP::runOnce()
{
if (_onPacket && udp.parsePacket() > 0) {
if (_onPacket && !isSending && udp.parsePacket() > 0) {
AsyncUDPPacket packet(udp);
_onPacket(packet);
}
+1
View File
@@ -31,6 +31,7 @@ class AsyncUDP : public Print, private concurrency::OSThread
private:
EthernetUDP udp;
uint16_t localPort;
volatile bool isSending = false;
std::function<void(AsyncUDPPacket)> _onPacket;
virtual int32_t runOnce() override;
};