mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 12:51:24 +01:00
be more strict about int vs char for the wifi diag
This commit is contained in:
parent
d95096ded8
commit
45b36c48cb
@ -377,11 +377,12 @@ bool WifiInterface::checkForOK( const unsigned int timeout, const FSH * waitfor,
|
||||
char *locator = (char *)waitfor;
|
||||
DIAG(F("Wifi Check: [%E]"), waitfor);
|
||||
while ( millis() - startTime < timeout) {
|
||||
while (wifiStream->available()) {
|
||||
int ch = wifiStream->read();
|
||||
int nextchar;
|
||||
while (wifiStream->available() && (nextchar = wifiStream->read()) > -1) {
|
||||
char ch = (char)nextchar;
|
||||
if (echo) {
|
||||
if (escapeEcho) StringFormatter::printEscape( ch); /// THIS IS A DIAG IN DISGUISE
|
||||
else USB_SERIAL.print((char)ch);
|
||||
else USB_SERIAL.print(ch);
|
||||
}
|
||||
if (ch != GETFLASH(locator)) locator = (char *)waitfor;
|
||||
if (ch == GETFLASH(locator)) {
|
||||
|
Loading…
Reference in New Issue
Block a user