Moznost predefinovat WifiConfigAPSSID metodu pro jiny zpusob definice SSID pro konfiguracni AP.

This commit is contained in:
Pavel Brychta 2021-10-16 17:45:56 +02:00
parent 3a6ddbcda4
commit 60fb85f3ff

View File

@ -34,6 +34,8 @@ extern "C" {
# include <esp_wifi.h>
#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());