diff --git a/src/meshwifi/meshwifi.cpp b/src/meshwifi/meshwifi.cpp index f395ff7b0..a88ed6ae3 100644 --- a/src/meshwifi/meshwifi.cpp +++ b/src/meshwifi/meshwifi.cpp @@ -3,14 +3,14 @@ #include "configuration.h" #include "main.h" #include "meshwifi/meshhttp.h" -#include #include +#include static void WiFiEvent(WiFiEvent_t event); DNSServer dnsServer; -bool isWifiAvailable() +bool isWifiAvailable() { const char *wifiName = radioConfig.preferences.wifi_ssid; const char *wifiPsw = radioConfig.preferences.wifi_password; @@ -66,7 +66,7 @@ void initWifi() if (*wifiName && *wifiPsw) { if (radioConfig.preferences.wifi_ap_mode) { - + IPAddress apIP(192, 168, 42, 1); WiFi.onEvent(WiFiEvent); @@ -76,7 +76,6 @@ void initWifi() dnsServer.start(53, "*", apIP); - } else { WiFi.mode(WIFI_MODE_STA); WiFi.onEvent(WiFiEvent); @@ -189,11 +188,11 @@ static void WiFiEvent(WiFiEvent_t event) break; default: break; - } } -void handleDNSResponse() { +void handleDNSResponse() +{ if (radioConfig.preferences.wifi_ap_mode) { dnsServer.processNextRequest(); }