mirror of
https://github.com/jeelabs/esp-link.git
synced 2026-03-24 09:56:52 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user