From 7753f6dbb5bc39e6c7ea6132fa271c0d5d4294c5 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Wed, 18 Nov 2020 23:53:06 +0100 Subject: [PATCH] many typos fixed --- WifiInterface.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/WifiInterface.cpp b/WifiInterface.cpp index 29a698c..ac309ef 100644 --- a/WifiInterface.cpp +++ b/WifiInterface.cpp @@ -171,8 +171,8 @@ wifiSerialState WifiInterface::setup2(const __FlashStringHelper* SSid, const __F // If the source code looks unconfigured, check if the // ESP8266 is preconfigured. We check the first 13 chars // of the SSid. - char *yourNetwork = "Your network "; - if (strncmp_P(yourNetwork, (const char*)SSid, 13) == 0 || SSid[0] == '\0') { + const char *yourNetwork = "Your network "; + if (strncmp_P(yourNetwork, (const char*)SSid, 13) == 0 || ((const char *)SSid)[0] == '\0') { delay(8000); // give a preconfigured ES8266 a chance to connect to a router StringFormatter::send(wifiStream, F("AT+CIFSR\r\n")); @@ -247,10 +247,11 @@ wifiSerialState WifiInterface::setup2(const __FlashStringHelper* SSid, const __F do { if (strncmp_P(yourNetwork, (const char*)password, 13) == 0) { // unconfigured - StringFormatter::send(wifiStream, F("AT+CWSAP=\"DCCEX_%s\",\"PASS_%s\",1,4\r\n"), macTail, macTail); + StringFormatter::send(wifiStream, F("AT+CWSAP=\"DCCEX_%s\",\"PASS_%s\",1,4\r\n"), macTail, macTail); } else { // password configured by user StringFormatter::send(wifiStream, F("AT+CWSAP=\"DCCEX_%s\",\"%s\",1,4\r\n"), macTail, password); + } } while (i++<2 && !checkForOK(16000, OK_SEARCH, true)); // do twice if necessary but ignore failure as AP mode may still be ok } else {