ethernet and wifi are working for ESP32

This commit is contained in:
lumapu 2024-03-21 21:06:02 +01:00
parent a44a5833ca
commit 89f7b4f1c6
16 changed files with 239 additions and 984 deletions

View file

@ -893,7 +893,7 @@ class RestApi {
mApp->getAvailNetworks(obj);
}
void getWifiIp(JsonObject obj) {
obj[F("ip")] = mApp->getStationIp();
obj[F("ip")] = mApp->getIp();
}
#endif /* !defined(ETHERNET) */
@ -1048,7 +1048,7 @@ class RestApi {
snprintf(mConfig->sys.stationSsid, SSID_LEN, "%s", jsonIn[F("ssid")].as<const char*>());
snprintf(mConfig->sys.stationPwd, PWD_LEN, "%s", jsonIn[F("pwd")].as<const char*>());
mApp->saveSettings(false); // without reboot
mApp->setStopApAllowedMode(false);
//mApp->setStopApAllowedMode(false);
mApp->setupStation();
}
#endif /* !defined(ETHERNET */