Inicializace AP kanalu

This commit is contained in:
Pavel Brychta 2020-10-20 07:43:52 +02:00
parent 11aaf8450f
commit 6f1dd6a7ba

View File

@ -940,6 +940,7 @@ void WiFiConfig::initConfig(int configBase, const String& ssid, const String& pa
EES_storeString(configBase + offsetof(wificonfigarea_t, pass), elementSize(wificonfigarea_t, pass), (String &)pass); EES_storeString(configBase + offsetof(wificonfigarea_t, pass), elementSize(wificonfigarea_t, pass), (String &)pass);
EEPROM.write(configBase + offsetof(wificonfigarea_t, mode), mode); EEPROM.write(configBase + offsetof(wificonfigarea_t, mode), mode);
EEPROM.write(configBase + offsetof(wificonfigarea_t, ip), ipcfg); EEPROM.write(configBase + offsetof(wificonfigarea_t, ip), ipcfg);
EEPROM.write(configBase + offsetof(wificonfigarea_t, apchannel), 3);
if (IPCONFIG_STATIC == ipcfg) { if (IPCONFIG_STATIC == ipcfg) {
setEEPROMuint32(configBase + offsetof(wificonfigarea_t, ipaddr), (uint32_t) ip); setEEPROMuint32(configBase + offsetof(wificonfigarea_t, ipaddr), (uint32_t) ip);
setEEPROMuint32(configBase + offsetof(wificonfigarea_t, netmask), (uint32_t) mask); setEEPROMuint32(configBase + offsetof(wificonfigarea_t, netmask), (uint32_t) mask);