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

Avoid bizarre compiler issues

AIDE and SAMD PlatformIO dont agree on write, so use print instead.
This commit is contained in:
Asbelos 2020-07-20 09:55:04 +01:00
parent 2ae7aedcd2
commit 177e243507

View File

@ -198,7 +198,7 @@ void WifiInterface::loop(Stream & wifiStream) {
if (loopstate!=99) return;
// AT this point we have read an incoming message into the buffer
streamer.write((char)'\0'); // null the end of the buffer so we can treat it as a string
streamer.print('\0'); // null the end of the buffer so we can treat it as a string
DIAG(F("\nWifiRead:%d:%e\n"),connectionId,buffer);
streamer.setBufferContentPosition(0,0); // reset write position to start of buffer
@ -212,7 +212,7 @@ void WifiInterface::loop(Stream & wifiStream) {
HTTPParser::parse(streamer,buffer);
closeAfter=true;
}
else if (buffer[0]=='<') parser.parse(streamer,buffer, true); // tell JMRI parser that ACKS afre blocking because we can't handle the async
else if (buffer[0]=='<') parser.parse(streamer,buffer, true); // tell JMRI parser that ACKS are blocking because we can't handle the async
else WiThrottle::getThrottle(connectionId)->parse(streamer, buffer);
@ -223,7 +223,7 @@ void WifiInterface::loop(Stream & wifiStream) {
return;
}
// prepare to send reply
streamer.write((char)'\0'); // just put a null byte on end of buffer so we can mark the end.
streamer.print('\0'); // null the end of the buffer so we can treat it as a string
DIAG(F("\nWiFiInterface reply c(%d) l(%d) [%e]\n"),connectionId,streamer.available()-1,buffer);
StringFormatter::send(wifiStream,F("AT+CIPSEND=%d,%d\r\n"),connectionId,streamer.available()-1);
loopTimeoutStart=millis();