1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-26 17:46:14 +01:00

loop over WiThrottle so that broadcast commands get into outbound ring and get sent

This commit is contained in:
Harald Barth 2022-08-06 00:34:35 +02:00
parent 7551c2d2f6
commit 012d427c6e
2 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,7 @@
#include "EthernetInterface.h" #include "EthernetInterface.h"
#include "DIAG.h" #include "DIAG.h"
#include "CommandDistributor.h" #include "CommandDistributor.h"
#include "WiThrottle.h"
#include "DCCTimer.h" #include "DCCTimer.h"
EthernetInterface * EthernetInterface::singleton=NULL; EthernetInterface * EthernetInterface::singleton=NULL;
@ -179,6 +180,8 @@ void EthernetInterface::loop()
} }
} }
WiThrottle::loop(outboundRing);
// handle at most 1 outbound transmission // handle at most 1 outbound transmission
int socketOut=outboundRing->read(); int socketOut=outboundRing->read();
if (socketOut>=0) { if (socketOut>=0) {

View File

@ -26,6 +26,7 @@
#include "DIAG.h" #include "DIAG.h"
#include "RingStream.h" #include "RingStream.h"
#include "CommandDistributor.h" #include "CommandDistributor.h"
#include "WiThrottle.h"
/* /*
#include "soc/rtc_wdt.h" #include "soc/rtc_wdt.h"
#include "esp_task_wdt.h" #include "esp_task_wdt.h"
@ -228,6 +229,8 @@ void WifiESP::loop() {
} }
} // all clients } // all clients
WiThrottle::loop(outboundRing);
// something to write out? // something to write out?
clientId=outboundRing->peek(); clientId=outboundRing->peek();
if (clientId >= 0) { if (clientId >= 0) {