html dashboard page, without upload

This commit is contained in:
Siwat Sirichai 2024-01-01 16:38:14 +07:00
parent 8c43d260d0
commit d340142879
10 changed files with 719 additions and 3 deletions

View file

@ -746,4 +746,64 @@ bool ESPMegaIoT::networkConnected()
void ESPMegaIoT::bindFRAM(FRAM *fram)
{
this->fram = fram;
}
}
/**
* @brief Get the Wifi IP address
*
* @return The Wifi IP address
*/
IPAddress ESPMegaIoT::getWifiIp() {
return WiFi.localIP();
}
/**
* @brief Get the Ethernet IP Address
*
* @return The Ethernet IP Address
*/
IPAddress ESPMegaIoT::getETHIp() {
return ETH.localIP();
}
/**
* @brief Get the IP address of the currently active network interface
*
* @return The IP address of the currently active network interface
*/
IPAddress ESPMegaIoT::getIp() {
if (network_config.useWifi)
return this->getWifiIp();
else
return this->getETHIp();
}
/**
* @brief Get the MAC Address of the Ethernet interface
*
* @return The MAC Address of the Ethernet interface
*/
String ESPMegaIoT::getETHMac() {
return ETH.macAddress();
}
/**
* @brief Get the MAC Address of the Wifi interface
*
* @return The MAC Address of the Wifi interface
*/
String ESPMegaIoT::getWifiMac() {
return WiFi.macAddress();
}
/**
* @brief Get the MAC Address of the currently active network interface
*
* @return The MAC Address of the currently active network interface
*/
String ESPMegaIoT::getMac() {
if (network_config.useWifi)
return this->getWifiMac();
else
return this->getETHMac();
}