Set Station parameters if defined

To allow changes both in STA or AP settings, they should be active.
Opmode is set to 3 few lines above, so changes allowed in both STA and
AP.
Because the above opmode set, this “if” is useless.
This commit is contained in:
KatAst
2016-01-02 13:01:42 +01:00
parent 6f4cead199
commit c8aab7611b

View File

@@ -859,9 +859,9 @@ void ICACHE_FLASH_ATTR wifiInit() {
DBG("Wifi init, mode=%s\n",wifiMode[x]);
// STATION parameters only on a full flash, because default opmode is 2
// STATION parameters
#if defined(STA_SSID) && defined(STA_PASS)
if( x == 2 ){
// Set parameters
if (os_strlen((char*)stconf.ssid) == 0 && os_strlen((char*)stconf.password) == 0) {
os_strncpy((char*)stconf.ssid, VERS_STR(STA_SSID), 32);
@@ -873,7 +873,7 @@ void ICACHE_FLASH_ATTR wifiInit() {
stconf.bssid_set = 0;
wifi_station_set_config(&stconf);
}
}
#endif
// Change SOFT_AP settings if defined