Wifi scanning
This commit is contained in:
@@ -78,12 +78,13 @@ void WifiManager::resetToApProvisioning()
|
||||
prefs_.remove("staPassword");
|
||||
}
|
||||
|
||||
void WifiManager::wifiWatchdog()
|
||||
void WifiManager::iteration()
|
||||
{
|
||||
if (state_ == STA && WiFi.status() != WL_CONNECTED) {
|
||||
startWifi();
|
||||
Serial.println("Connection lost - Restarting WIFI");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*
|
||||
* When operating in access point mode, the device IP is 192.168.42.1
|
||||
*
|
||||
* call wifiWatchdog regularly to reconnect in station mode if connection was lost
|
||||
* call iteration() regularly, it has a wifiWatchdog to reconnect in station mode if connection was lost
|
||||
*/
|
||||
class WifiManager
|
||||
{
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
void setApCredentials(const char *password);
|
||||
void resetToApProvisioning();
|
||||
|
||||
void wifiWatchdog();
|
||||
void iteration();
|
||||
|
||||
bool inProvisioningMode() const { return state_ == INVALID || state_ == AP_PROVISIONING; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user