mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-17 18:52:07 +02:00
[Fix] WiFi reset failed and crash in offline mode
This commit is contained in:
@ -338,7 +338,16 @@ bool WifiConnector::isConnected(void) { return WiFi.isConnected(); }
|
||||
* this method
|
||||
*
|
||||
*/
|
||||
void WifiConnector::reset(void) { WIFI()->resetSettings(); }
|
||||
void WifiConnector::reset(void) {
|
||||
if(this->wifi == NULL) {
|
||||
this->wifi = new WiFiManager();
|
||||
if(this->wifi == NULL){
|
||||
logInfo("reset failed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
WIFI()->resetSettings();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get wifi RSSI
|
||||
|
Reference in New Issue
Block a user