1
0
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:
Asbelos 2022-12-02 12:53:06 +00:00
parent b4e707ddde
commit 5a2b008367
3 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -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;

View File

@ -4,7 +4,7 @@
#include "StringFormatter.h"
#define VERSION "4.2.7"
#define VERSION "4.2.7a"
// 4.2.6 FIX: Remove RAM thief
// FIX: ADC port 8-15 fix
// 4.2.5 Make GETFLASHW code more universal