mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-03-31 10:40:12 +02:00
more send diag
This commit is contained in:
parent
afd4626988
commit
1c7a5320d8
11
WifiESP.cpp
11
WifiESP.cpp
@ -163,8 +163,15 @@ void WifiESP::loop() {
|
|||||||
DIAG(F("Wifi reply client=%d, count=%d"), clientId,count);
|
DIAG(F("Wifi reply client=%d, count=%d"), clientId,count);
|
||||||
{
|
{
|
||||||
char buffer[count+1];
|
char buffer[count+1];
|
||||||
for(uint8_t i=0;i<count;i++)
|
for(uint8_t i=0;i<count;i++) {
|
||||||
buffer[i] = (char)outboundRing->read();
|
int c = outboundRing->read();
|
||||||
|
if (c >= 0)
|
||||||
|
buffer[i] = (char)c;
|
||||||
|
else {
|
||||||
|
DIAG(F("Ringread fail at %d"),i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
buffer[count]=0;
|
buffer[count]=0;
|
||||||
DIAG(F("SEND:%s COUNT:%d"),buffer,count);
|
DIAG(F("SEND:%s COUNT:%d"),buffer,count);
|
||||||
sendData(clientId, buffer, count);
|
sendData(clientId, buffer, count);
|
||||||
|
Loading…
Reference in New Issue
Block a user