connect wifi or eth, only one

This commit is contained in:
MichaelDvP
2023-05-10 18:48:36 +02:00
parent 5abe9530d7
commit 2f5e5535c8

View File

@@ -657,10 +657,15 @@ void System::network_init(bool refresh) {
last_system_check_ = 0; // force the LED to go from fast flash to pulse last_system_check_ = 0; // force the LED to go from fast flash to pulse
// no ethernet present bool disableEth;
if (phy_type_ == PHY_type::PHY_TYPE_NONE) { EMSESP::esp8266React.getNetworkSettingsService()->read([&](NetworkSettings & settings) {
disableEth = settings.ssid.length() > 0;
});
// no ethernet present or disabled
if (phy_type_ == PHY_type::PHY_TYPE_NONE || disableEth) {
return; return;
} } // no ethernet present
// configure Ethernet // configure Ethernet
int mdc = 23; // Pin# of the I²C clock signal for the Ethernet PHY - hardcoded int mdc = 23; // Pin# of the I²C clock signal for the Ethernet PHY - hardcoded