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

more send diag

This commit is contained in:
Harald Barth 2021-09-28 17:31:12 +02:00
parent afd4626988
commit 1c7a5320d8

View File

@ -163,8 +163,15 @@ void WifiESP::loop() {
DIAG(F("Wifi reply client=%d, count=%d"), clientId,count);
{
char buffer[count+1];
for(uint8_t i=0;i<count;i++)
buffer[i] = (char)outboundRing->read();
for(uint8_t i=0;i<count;i++) {
int c = outboundRing->read();
if (c >= 0)
buffer[i] = (char)c;
else {
DIAG(F("Ringread fail at %d"),i);
break;
}
}
buffer[count]=0;
DIAG(F("SEND:%s COUNT:%d"),buffer,count);
sendData(clientId, buffer, count);