Made conforming changes to setVerboseWiFiReconnect
This commit is contained in:
parent
a93aef1604
commit
5ce7211539
|
|
@ -408,7 +408,8 @@ void Span::checkConnect(){
|
|||
LOG0("\n*** Can't connect to %s. You may type 'W <return>' to re-configure WiFi, or 'X <return>' to erase WiFi credentials. Will try connecting again in 60 seconds.\n\n",network.wifiData.ssid);
|
||||
waitTime=60000;
|
||||
} else {
|
||||
if (verboseWiFiReconnect) addWebLog(true,"Trying to connect to %s. Waiting %d sec...",network.wifiData.ssid,waitTime/1000);
|
||||
if(verboseWifiReconnect)
|
||||
addWebLog(true,"Trying to connect to %s. Waiting %d sec...",network.wifiData.ssid,waitTime/1000);
|
||||
WiFi.begin(network.wifiData.ssid,network.wifiData.pwd);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ class Span{
|
|||
Network network; // configures WiFi and Setup Code via either serial monitor or temporary Access Point
|
||||
SpanWebLog webLog; // optional web status/log
|
||||
TaskHandle_t pollTaskHandle = NULL; // optional task handle to use for poll() function
|
||||
boolean verboseWiFiReconnect = true; // Set to false to not print WiFi reconnect attempts messages
|
||||
boolean verboseWifiReconnect = true; // set to false to not print WiFi reconnect attempts messages
|
||||
|
||||
SpanOTA spanOTA; // manages OTA process
|
||||
SpanConfig hapConfig; // track configuration changes to the HAP Accessory database; used to increment the configuration number (c#) when changes found
|
||||
|
|
@ -353,7 +353,7 @@ class Span{
|
|||
Span& setWebLogCSS(const char *css){webLog.css="\n" + String(css) + "\n";return(*this);}
|
||||
Span& setWebLogCallback(void (*f)(String &)){weblogCallback=f;return(*this);}
|
||||
|
||||
void setVerboseWiFiReconnect(bool verbose) { verboseWiFiReconnect = verbose;}
|
||||
Span& setVerboseWifiReconnect(bool verbose=true){verboseWifiReconnect=verbose;return(*this);}
|
||||
|
||||
void autoPoll(uint32_t stackSize=8192, uint32_t priority=1, uint32_t cpu=0){ // start pollTask()
|
||||
xTaskCreateUniversal([](void *parms){for(;;)homeSpan.pollTask();}, "pollTask", stackSize, NULL, priority, &pollTaskHandle, cpu);
|
||||
|
|
|
|||
|
|
@ -74,7 +74,8 @@ void setup() {
|
|||
// homeSpan.enableOTA();
|
||||
|
||||
homeSpan.setWifiCallback(wifiCB);
|
||||
homeSpan.setWifiCallbackAll(wifiCB_ALL);
|
||||
homeSpan.setWifiCallbackAll(wifiCB_ALL).setVerboseWifiReconnect(false);
|
||||
|
||||
|
||||
new SpanUserCommand('D', " - disconnect WiFi", [](const char *buf){WiFi.disconnect();});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue