mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-26 17:46:14 +01:00
minor tweaks
This commit is contained in:
parent
b4e707ddde
commit
5a2b008367
|
@ -95,7 +95,7 @@ void WifiInboundHandler::loop1() {
|
|||
|
||||
WifiInboundHandler::INBOUND_STATE WifiInboundHandler::loop2() {
|
||||
while (wifiStream->available()) {
|
||||
int ch = wifiStream->read();
|
||||
char ch = wifiStream->read();
|
||||
|
||||
// echo the char to the diagnostic stream in escaped format
|
||||
if (Diag::WIFI) {
|
||||
|
@ -116,7 +116,7 @@ WifiInboundHandler::INBOUND_STATE WifiInboundHandler::loop2() {
|
|||
for (int i=0;i<currentReplySize;i++) {
|
||||
int cout=outboundRing->read();
|
||||
wifiStream->write(cout);
|
||||
if (Diag::WIFI) StringFormatter::printEscape(cout); // DIAG in disguise
|
||||
if (Diag::WIFI) StringFormatter::printEscape((char)cout); // DIAG in disguise
|
||||
}
|
||||
clientPendingCIPSEND=-1;
|
||||
pendingCipsend=false;
|
||||
|
|
|
@ -177,7 +177,7 @@ wifiSerialState WifiInterface::setup2(const FSH* SSid, const FSH* password,
|
|||
StringFormatter::send(wifiStream, F("AT+CWJAP_CUR?\r\n"));
|
||||
if (!(checkForOK(2000, true))) {
|
||||
oldCmd=true;
|
||||
while (wifiStream->available()) StringFormatter::printEscape( wifiStream->read()); /// THIS IS A DIAG IN DISGUISE
|
||||
while (wifiStream->available()) StringFormatter::printEscape( (char)(wifiStream->read())); /// THIS IS A DIAG IN DISGUISE
|
||||
}
|
||||
|
||||
StringFormatter::send(wifiStream, F("AT+CWMODE%s=1\r\n"), oldCmd ? "" : "_CUR"); // configure as "station" = WiFi client
|
||||
|
@ -237,7 +237,7 @@ wifiSerialState WifiInterface::setup2(const FSH* SSid, const FSH* password,
|
|||
StringFormatter::send(wifiStream, F("AT+CWMODE%s=2\r\n"), oldCmd ? "" : "_CUR");
|
||||
} while (!checkForOK(1000+i*500, true) && i++<10);
|
||||
|
||||
while (wifiStream->available()) StringFormatter::printEscape( wifiStream->read()); /// THIS IS A DIAG IN DISGUISE
|
||||
while (wifiStream->available()) StringFormatter::printEscape( (char)(wifiStream->read())); /// THIS IS A DIAG IN DISGUISE
|
||||
|
||||
// Figure out MAC addr
|
||||
StringFormatter::send(wifiStream, F("AT+CIFSR\r\n")); // not TOMATO
|
||||
|
@ -303,7 +303,7 @@ wifiSerialState WifiInterface::setup2(const FSH* SSid, const FSH* password,
|
|||
for(byte ipLen=0;ipLen<MAX_IP_LENGTH;ipLen++) {
|
||||
while(!wifiStream->available());
|
||||
int ipChar=wifiStream->read();
|
||||
StringFormatter::printEscape(ipChar);
|
||||
StringFormatter::printEscape((char)ipChar);
|
||||
if (ipChar=='"') {
|
||||
ipString[ipLen]='\0';
|
||||
break;
|
||||
|
@ -380,7 +380,7 @@ bool WifiInterface::checkForOK( const unsigned int timeout, const FSH * waitfor,
|
|||
while (wifiStream->available()) {
|
||||
int ch = wifiStream->read();
|
||||
if (echo) {
|
||||
if (escapeEcho) StringFormatter::printEscape( ch); /// THIS IS A DIAG IN DISGUISE
|
||||
if (escapeEcho) StringFormatter::printEscape( (char)ch); /// THIS IS A DIAG IN DISGUISE
|
||||
else USB_SERIAL.print((char)ch);
|
||||
}
|
||||
if (ch != GETFLASH(locator)) locator = (char *)waitfor;
|
||||
|
|
Loading…
Reference in New Issue
Block a user