Fixed build issue

This commit is contained in:
Gunnar Skjold 2023-12-10 17:05:09 +01:00
parent 0f22fd561e
commit f3805ad111
2 changed files with 23 additions and 0 deletions

View File

@ -57,6 +57,9 @@ bool EthernetConnectionHandler::connect(NetworkConfig config, SystemConfig sys)
ethPowerPin = 16;
ethMdc = 23;
ethMdio = 18;
} else if(sys.boardType == 244) {
if (debugger->isActive(RemoteDebug::DEBUG)) debugger->printf_P(PSTR("LilyGO T-ETH-Lite\n"));
return false; // TODO
} else {
if (debugger->isActive(RemoteDebug::ERROR)) debugger->printf_P(PSTR("Board type %d incompatible with ETH\n"), sys.boardType);
return false;
@ -146,17 +149,33 @@ void EthernetConnectionHandler::getCurrentConfig(NetworkConfig& networkConfig) {
}
IPAddress EthernetConnectionHandler::getIP() {
#if defined(ESP32)
return ETH.localIP();
#else
return NULL;
#endif
}
IPAddress EthernetConnectionHandler::getSubnetMask() {
#if defined(ESP32)
return ETH.subnetMask();
#else
return NULL;
#endif
}
IPAddress EthernetConnectionHandler::getGateway() {
#if defined(ESP32)
return ETH.gatewayIP();
#else
return NULL;
#endif
}
IPAddress EthernetConnectionHandler::getDns(uint8_t idx) {
#if defined(ESP32)
return ETH.dnsIP(idx);
#else
return NULL;
#endif
}

View File

@ -76,7 +76,11 @@ IPAddress WiFiAccessPointConnectionHandler::getIP() {
}
IPAddress WiFiAccessPointConnectionHandler::getSubnetMask() {
#if defined(ESP32)
return WiFi.softAPSubnetMask();
#else
return IPAddress(255,255,255,0);
#endif
}
IPAddress WiFiAccessPointConnectionHandler::getGateway() {