From 60fb85f3ff938bfb11551114d354308da889fe22 Mon Sep 17 00:00:00 2001 From: Pablo2048 Date: Sat, 16 Oct 2021 17:45:56 +0200 Subject: [PATCH] Moznost predefinovat WifiConfigAPSSID metodu pro jiny zpusob definice SSID pro konfiguracni AP. --- src/WiFiConfig.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/WiFiConfig.cpp b/src/WiFiConfig.cpp index bbbe948..51ccfa5 100644 --- a/src/WiFiConfig.cpp +++ b/src/WiFiConfig.cpp @@ -34,6 +34,8 @@ extern "C" { # include #endif +String WifiConfigAPSSID(void) __attribute__((weak)); + #define DNS_PORT 53 extern char WiFiDeviceName[]; @@ -42,6 +44,13 @@ static const char CHECKED[] PROGMEM = "checked='checked'"; static bool _doReconfig = false; // TODO: mozna nejak elegantneji? Ale zase setrime RAM... +String WifiConfigAPSSID(void) +{ + String ssid = SETUP_SSID; + + return ssid; +} + static uint32_t ESP_getChipId(void) { #if defined(ESP8266) @@ -538,7 +547,7 @@ void WiFiConfig::_handleSetAP(AsyncWebServerRequest *request) // Start WiFi v rezimu AP pro nastaveni modulu wificonfigresult_t WiFiConfig::_setupAP(wificonfig_cb cb) { - String ssid = SETUP_SSID; + String ssid = WifiConfigAPSSID(); WiFi.persistent(false); // chranime flash pred zbytecnymi prepisy dnsServer.reset(new DNSServer());