Moznost predefinovat WifiConfigAPSSID metodu pro jiny zpusob definice SSID pro konfiguracni AP.
This commit is contained in:
		| @@ -34,6 +34,8 @@ extern "C" { | |||||||
| # include <esp_wifi.h> | # include <esp_wifi.h> | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | String WifiConfigAPSSID(void) __attribute__((weak)); | ||||||
|  |  | ||||||
| #define DNS_PORT 53 | #define DNS_PORT 53 | ||||||
|  |  | ||||||
| extern char WiFiDeviceName[]; | 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... | 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) | static uint32_t ESP_getChipId(void) | ||||||
| { | { | ||||||
| #if defined(ESP8266) | #if defined(ESP8266) | ||||||
| @@ -538,7 +547,7 @@ void WiFiConfig::_handleSetAP(AsyncWebServerRequest *request) | |||||||
| // Start WiFi v rezimu AP pro nastaveni modulu | // Start WiFi v rezimu AP pro nastaveni modulu | ||||||
| wificonfigresult_t WiFiConfig::_setupAP(wificonfig_cb cb) | wificonfigresult_t WiFiConfig::_setupAP(wificonfig_cb cb) | ||||||
| { | { | ||||||
|     String ssid = SETUP_SSID; |     String ssid = WifiConfigAPSSID(); | ||||||
|  |  | ||||||
|     WiFi.persistent(false); // chranime flash pred zbytecnymi prepisy |     WiFi.persistent(false); // chranime flash pred zbytecnymi prepisy | ||||||
|     dnsServer.reset(new DNSServer()); |     dnsServer.reset(new DNSServer()); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user