esp8266 works

This commit is contained in:
lumapu 2024-03-24 16:27:24 +01:00
parent ac7c80ddea
commit 73c48fab9c
3 changed files with 14 additions and 8 deletions

View file

@ -1,5 +1,7 @@
# Development Changes # Development Changes
## 0.8.98 - 2024-03-23
## 0.8.97 - 2024-03-22 ## 0.8.97 - 2024-03-22
* add support for newest generation of inverters with A-F in their serial number * add support for newest generation of inverters with A-F in their serial number
* fix NTP and sunrise / sunset * fix NTP and sunrise / sunset

View file

@ -23,12 +23,14 @@ class AhoyWifi : public AhoyNetwork {
}); });
WiFi.setHostname(mConfig->sys.deviceName); WiFi.setHostname(mConfig->sys.deviceName);
WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN); #if !defined(AP_ONLY)
WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL); WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN);
WiFi.begin(mConfig->sys.stationSsid, mConfig->sys.stationPwd, 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(F("connect to network '")); Serial.flush();
DBGPRINT(mConfig->sys.stationSsid); DBGPRINT(mConfig->sys.stationSsid);
#endif
} }
void tickNetworkLoop() override { void tickNetworkLoop() override {

View file

@ -23,10 +23,12 @@ class AhoyWifi : public AhoyNetwork {
}); });
WiFi.setHostname(mConfig->sys.deviceName); 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(F("connect to network '")); Serial.flush();
DBGPRINT(mConfig->sys.stationSsid); DBGPRINT(mConfig->sys.stationSsid);
#endif
} }
void tickNetworkLoop() override { void tickNetworkLoop() override {