mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-25 13:41:23 +01:00
outboundRing uses sendData
This commit is contained in:
parent
fa1d1619b6
commit
35cba02ee7
11
WifiESP.cpp
11
WifiESP.cpp
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user