mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-23 11:16:45 +00:00
Code cleanup
This commit is contained in:
parent
d482648ecf
commit
32b8e2b3a1
@ -565,6 +565,7 @@ static void webHandleInfoJson()
|
|||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/*
|
||||||
static void webHandleInfo()
|
static void webHandleInfo()
|
||||||
{ // http://plate01/
|
{ // http://plate01/
|
||||||
if(!httpIsAuthenticated(F("info"))) return;
|
if(!httpIsAuthenticated(F("info"))) return;
|
||||||
@ -577,7 +578,7 @@ static void webHandleInfo()
|
|||||||
httpMessage += haspDevice.get_hostname();
|
httpMessage += haspDevice.get_hostname();
|
||||||
httpMessage += F("</h1><hr>");
|
httpMessage += F("</h1><hr>");
|
||||||
|
|
||||||
/* HASP Stats */
|
// HASP Stats
|
||||||
httpMessage += F("<b>HASP Version: </b>");
|
httpMessage += F("<b>HASP Version: </b>");
|
||||||
httpMessage += haspDevice.get_version();
|
httpMessage += haspDevice.get_version();
|
||||||
httpMessage += F("<br/><b>Build DateTime: </b>");
|
httpMessage += F("<br/><b>Build DateTime: </b>");
|
||||||
@ -627,7 +628,7 @@ static void webHandleInfo()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* LVGL Stats */
|
// LVGL Stats
|
||||||
lv_mem_monitor_t mem_mon;
|
lv_mem_monitor_t mem_mon;
|
||||||
lv_mem_monitor(&mem_mon);
|
lv_mem_monitor(&mem_mon);
|
||||||
httpMessage += F("</p><p><b>LVGL Memory: </b>");
|
httpMessage += F("</p><p><b>LVGL Memory: </b>");
|
||||||
@ -645,7 +646,7 @@ static void webHandleInfo()
|
|||||||
httpMessage += F("</p/><p><b>LCD Active Page: </b>");
|
httpMessage += F("</p/><p><b>LCD Active Page: </b>");
|
||||||
httpMessage += String(haspPages.get());
|
httpMessage += String(haspPages.get());
|
||||||
|
|
||||||
/* Wifi Stats */
|
// Wifi Stats
|
||||||
#if HASP_USE_WIFI > 0
|
#if HASP_USE_WIFI > 0
|
||||||
httpMessage += F("</p/><p><b>SSID: </b>");
|
httpMessage += F("</p/><p><b>SSID: </b>");
|
||||||
httpMessage += String(WiFi.SSID());
|
httpMessage += String(WiFi.SSID());
|
||||||
@ -707,7 +708,8 @@ static void webHandleInfo()
|
|||||||
httpMessage += String(ETH.macAddress());
|
httpMessage += String(ETH.macAddress());
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
/* Mqtt Stats */
|
|
||||||
|
// Mqtt Stats
|
||||||
#if HASP_USE_MQTT > 0
|
#if HASP_USE_MQTT > 0
|
||||||
httpMessage += F("</p/><p><b>MQTT Status: </b>");
|
httpMessage += F("</p/><p><b>MQTT Status: </b>");
|
||||||
if(mqttIsConnected()) { // Check MQTT connection
|
if(mqttIsConnected()) { // Check MQTT connection
|
||||||
@ -728,7 +730,7 @@ static void webHandleInfo()
|
|||||||
|
|
||||||
#endif // MQTT
|
#endif // MQTT
|
||||||
|
|
||||||
/* ESP Stats */
|
// ESP Stats
|
||||||
httpMessage += F("</p/><p><b>MCU Model: </b>");
|
httpMessage += F("</p/><p><b>MCU Model: </b>");
|
||||||
httpMessage += haspDevice.get_chip_model();
|
httpMessage += haspDevice.get_chip_model();
|
||||||
httpMessage += F("<br/><b>CPU Frequency: </b>");
|
httpMessage += F("<br/><b>CPU Frequency: </b>");
|
||||||
@ -766,6 +768,7 @@ static void webHandleInfo()
|
|||||||
}
|
}
|
||||||
webSendFooter();
|
webSendFooter();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/* String urldecode(String str)
|
/* String urldecode(String str)
|
||||||
{
|
{
|
||||||
@ -2473,20 +2476,22 @@ void httpSetup()
|
|||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// static void httpReconnect()
|
/*
|
||||||
// {
|
static void httpReconnect()
|
||||||
// if(!http_config.enable) return;
|
{
|
||||||
|
if(!http_config.enable) return;
|
||||||
|
|
||||||
// if(webServerStarted) {
|
if(webServerStarted) {
|
||||||
// httpStop();
|
httpStop();
|
||||||
// } else
|
} else
|
||||||
// #if HASP_USE_WIFI > 0 && !defined(STM32F4xx)
|
#if HASP_USE_WIFI > 0 && !defined(STM32F4xx)
|
||||||
// if(WiFi.status() == WL_CONNECTED || WiFi.getMode() != WIFI_STA)
|
if(WiFi.status() == WL_CONNECTED || WiFi.getMode() != WIFI_STA)
|
||||||
// #endif
|
#endif
|
||||||
// {
|
{
|
||||||
// httpStart();
|
httpStart();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
IRAM_ATTR void httpLoop(void)
|
IRAM_ATTR void httpLoop(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user