mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-18 03:02:10 +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
|
* 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
|
* @brief Get wifi RSSI
|
||||||
|
Reference in New Issue
Block a user