diff --git a/src/CHANGES.md b/src/CHANGES.md index af1ecd86..8d89f003 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -1,5 +1,7 @@ # Development Changes +## 0.8.98 - 2024-03-23 + ## 0.8.97 - 2024-03-22 * add support for newest generation of inverters with A-F in their serial number * fix NTP and sunrise / sunset diff --git a/src/network/AhoyWifiEsp32.h b/src/network/AhoyWifiEsp32.h index f9fc064a..99733ad2 100644 --- a/src/network/AhoyWifiEsp32.h +++ b/src/network/AhoyWifiEsp32.h @@ -23,12 +23,14 @@ class AhoyWifi : public AhoyNetwork { }); WiFi.setHostname(mConfig->sys.deviceName); - WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN); - WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL); - WiFi.begin(mConfig->sys.stationSsid, mConfig->sys.stationPwd, WIFI_ALL_CHANNEL_SCAN); - - DBGPRINT(F("connect to network '")); Serial.flush(); - DBGPRINT(mConfig->sys.stationSsid); + #if !defined(AP_ONLY) + WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN); + WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL); + WiFi.begin(mConfig->sys.stationSsid, mConfig->sys.stationPwd, WIFI_ALL_CHANNEL_SCAN); + + DBGPRINT(F("connect to network '")); Serial.flush(); + DBGPRINT(mConfig->sys.stationSsid); + #endif } void tickNetworkLoop() override { diff --git a/src/network/AhoyWifiEsp8266.h b/src/network/AhoyWifiEsp8266.h index 1a068797..16a62b4b 100644 --- a/src/network/AhoyWifiEsp8266.h +++ b/src/network/AhoyWifiEsp8266.h @@ -23,10 +23,12 @@ class AhoyWifi : public AhoyNetwork { }); WiFi.setHostname(mConfig->sys.deviceName); - WiFi.begin(mConfig->sys.stationSsid, mConfig->sys.stationPwd); + #if !defined(AP_ONLY) + WiFi.begin(mConfig->sys.stationSsid, mConfig->sys.stationPwd); - DBGPRINT(F("connect to network '")); Serial.flush(); - DBGPRINT(mConfig->sys.stationSsid); + DBGPRINT(F("connect to network '")); Serial.flush(); + DBGPRINT(mConfig->sys.stationSsid); + #endif } void tickNetworkLoop() override {