mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +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;
|
char *locator = (char *)waitfor;
|
||||||
DIAG(F("Wifi Check: [%E]"), waitfor);
|
DIAG(F("Wifi Check: [%E]"), waitfor);
|
||||||
while ( millis() - startTime < timeout) {
|
while ( millis() - startTime < timeout) {
|
||||||
while (wifiStream->available()) {
|
int nextchar;
|
||||||
int ch = wifiStream->read();
|
while (wifiStream->available() && (nextchar = wifiStream->read()) > -1) {
|
||||||
|
char ch = (char)nextchar;
|
||||||
if (echo) {
|
if (echo) {
|
||||||
if (escapeEcho) StringFormatter::printEscape( ch); /// THIS IS A DIAG IN DISGUISE
|
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)) locator = (char *)waitfor;
|
||||||
if (ch == GETFLASH(locator)) {
|
if (ch == GETFLASH(locator)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user