From 012d427c6e381c5386fb7eebfdaa133688d4b230 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sat, 6 Aug 2022 00:34:35 +0200 Subject: [PATCH] loop over WiThrottle so that broadcast commands get into outbound ring and get sent --- EthernetInterface.cpp | 3 +++ WifiESP32.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/EthernetInterface.cpp b/EthernetInterface.cpp index f691f45..48f9002 100644 --- a/EthernetInterface.cpp +++ b/EthernetInterface.cpp @@ -26,6 +26,7 @@ #include "EthernetInterface.h" #include "DIAG.h" #include "CommandDistributor.h" +#include "WiThrottle.h" #include "DCCTimer.h" EthernetInterface * EthernetInterface::singleton=NULL; @@ -178,6 +179,8 @@ void EthernetInterface::loop() if (Diag::ETHERNET) DIAG(F("Ethernet: disconnect %d "), socket); } } + + WiThrottle::loop(outboundRing); // handle at most 1 outbound transmission int socketOut=outboundRing->read(); diff --git a/WifiESP32.cpp b/WifiESP32.cpp index 3be3827..22a02ca 100644 --- a/WifiESP32.cpp +++ b/WifiESP32.cpp @@ -26,6 +26,7 @@ #include "DIAG.h" #include "RingStream.h" #include "CommandDistributor.h" +#include "WiThrottle.h" /* #include "soc/rtc_wdt.h" #include "esp_task_wdt.h" @@ -228,6 +229,8 @@ void WifiESP::loop() { } } // all clients + WiThrottle::loop(outboundRing); + // something to write out? clientId=outboundRing->peek(); if (clientId >= 0) {