WifiProtocol - force when change only
force special wifi protocol when > 0
This commit is contained in:
1 parent
2d5633b113
commit
647df124d5
1 file changed
+3
-3
+3
-3
@@ -644,7 +644,7 @@ void forceWifiProtocol() {
|
|||||||
void reinit_wifi() {
|
void reinit_wifi() {
|
||||||
delay(10);
|
delay(10);
|
||||||
WiFi.mode(WIFI_STA);
|
WiFi.mode(WIFI_STA);
|
||||||
if (!wifiProtocol) forceWifiProtocol();
|
if (wifiProtocol) forceWifiProtocol();
|
||||||
WiFi.begin();
|
WiFi.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -743,7 +743,7 @@ void setOTA() {
|
|||||||
void setup_wifi() {
|
void setup_wifi() {
|
||||||
delay(10);
|
delay(10);
|
||||||
WiFi.mode(WIFI_STA);
|
WiFi.mode(WIFI_STA);
|
||||||
if (!wifiProtocol) forceWifiProtocol();
|
if (wifiProtocol) forceWifiProtocol();
|
||||||
|
|
||||||
// We start by connecting to a WiFi network
|
// We start by connecting to a WiFi network
|
||||||
Log.trace(F("Connecting to %s" CR), wifi_ssid);
|
Log.trace(F("Connecting to %s" CR), wifi_ssid);
|
||||||
@@ -832,7 +832,7 @@ void setup_wifimanager(bool reset_settings) {
|
|||||||
# endif
|
# endif
|
||||||
delay(10);
|
delay(10);
|
||||||
WiFi.mode(WIFI_STA);
|
WiFi.mode(WIFI_STA);
|
||||||
if (!wifiProtocol) forceWifiProtocol();
|
if (wifiProtocol) forceWifiProtocol();
|
||||||
|
|
||||||
if (reset_settings)
|
if (reset_settings)
|
||||||
eraseAndRestart();
|
eraseAndRestart();
|
||||||
|
|||||||
Reference in new issue
Block a user