mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 18:52:30 +00:00
Adds configuration option to exclude the webserver on esp32. (#3369)
* Adds configuration option to not build/include the webserver.
* Adds configuration option to not build/include the webserver.
* Keep initApiServer when excluding webserver
* fixes for failed formatting check
* Once more with feeling! Fix for regression.
* Fix includes for ARCH_ESP32
* Format changes from trunk
* Merge updates from origin
* Revert "Format changes from trunk"
This reverts commit 436e631774.
* jeez!
* tryfix proto conflict
---------
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
This commit is contained in:
@@ -10,7 +10,9 @@
|
||||
#include <WiFi.h>
|
||||
#include <WiFiUdp.h>
|
||||
#ifdef ARCH_ESP32
|
||||
#if !MESHTASTIC_EXCLUDE_WEBSERVER
|
||||
#include "mesh/http/WebServer.h"
|
||||
#endif
|
||||
#include <ESPmDNS.h>
|
||||
#include <esp_wifi.h>
|
||||
static void WiFiEvent(WiFiEvent_t event);
|
||||
@@ -92,11 +94,10 @@ static void onNetworkConnected()
|
||||
syslog.enable();
|
||||
}
|
||||
|
||||
#ifdef ARCH_ESP32
|
||||
#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_WEBSERVER
|
||||
initWebServer();
|
||||
#endif
|
||||
initApiServer();
|
||||
|
||||
APStartupComplete = true;
|
||||
}
|
||||
|
||||
@@ -146,7 +147,6 @@ static int32_t reconnectWiFi()
|
||||
|
||||
perhapsSetRTC(RTCQualityNTP, &tv);
|
||||
lastrun_ntp = millis();
|
||||
|
||||
} else {
|
||||
LOG_DEBUG("NTP Update failed\n");
|
||||
}
|
||||
@@ -204,7 +204,9 @@ bool initWifi()
|
||||
const char *wifiPsw = config.network.wifi_psk;
|
||||
|
||||
#ifndef ARCH_RP2040
|
||||
createSSLCert(); // For WebServer
|
||||
#if !MESHTASTIC_EXCLUDE_WEBSERVER
|
||||
createSSLCert(); // For WebServer
|
||||
#endif
|
||||
esp_wifi_set_storage(WIFI_STORAGE_RAM); // Disable flash storage for WiFi credentials
|
||||
#endif
|
||||
if (!*wifiPsw) // Treat empty password as no password
|
||||
@@ -405,4 +407,4 @@ static void WiFiEvent(WiFiEvent_t event)
|
||||
uint8_t getWifiDisconnectReason()
|
||||
{
|
||||
return wifiDisconnectReason;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user