mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
connect wifi or eth, only one
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user