mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-27 02:14:37 +00:00
Auto formatting of meshwifi.cpp
This commit is contained in:
parent
65fc1cf4a6
commit
82fbedbf41
@ -3,14 +3,14 @@
|
||||
#include "configuration.h"
|
||||
#include "main.h"
|
||||
#include "meshwifi/meshhttp.h"
|
||||
#include <WiFi.h>
|
||||
#include <DNSServer.h>
|
||||
#include <WiFi.h>
|
||||
|
||||
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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user