1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-25 21:41:23 +01:00

outboundRing uses sendData

This commit is contained in:
Harald Barth 2021-09-26 10:59:07 +02:00
parent fa1d1619b6
commit 35cba02ee7

View File

@ -124,6 +124,17 @@ void WifiESP::loop() {
// Do something with outboundRing // Do something with outboundRing
// call sendData // call sendData
int clientId=outboundRing->read();
if (clientId>=0) {
int count=outboundRing->count();
DIAG(F("Wifi reply client=%d, count=:%d"), clientId,count);
{
char buffer[count];
for(uint8_t i=0;i<count;i++)
buffer[i] = (char)outboundRing->read();
sendData(clientId, buffer, count);
}
}
static unsigned long last = 0; static unsigned long last = 0;
if (millis() - last > 60000) { if (millis() - last > 60000) {