add esp model and wifi mode status to info page headers

This commit is contained in:
tablatronix
2022-09-20 22:11:15 -05:00
parent 6d23d7591f
commit 30efa2e028
2 changed files with 11 additions and 6 deletions
+9 -4
View File
@@ -2052,9 +2052,14 @@ void WiFiManager::handleInfo() {
String WiFiManager::getInfoData(String id){
String p;
// @todo add WM versioning
if(id==F("esphead"))p = FPSTR(HTTP_INFO_esphead);
else if(id==F("wifihead"))p = FPSTR(HTTP_INFO_wifihead);
if(id==F("esphead")){
p = FPSTR(HTTP_INFO_esphead);
p.replace(FPSTR(T_1),(String)ESP.getChipModel());
}
else if(id==F("wifihead")){
p = FPSTR(HTTP_INFO_wifihead);
p.replace(FPSTR(T_1),getModeString(WiFi.getMode()));
}
else if(id==F("uptime")){
// subject to rollover!
p = FPSTR(HTTP_INFO_uptime);
@@ -2107,7 +2112,7 @@ String WiFiManager::getInfoData(String id){
p = FPSTR(HTTP_INFO_bootver);
p.replace(FPSTR(T_1),(String)system_get_boot_version());
}
#endif
#endif
else if(id==F("cpufreq")){
p = FPSTR(HTTP_INFO_cpufreq);
p.replace(FPSTR(T_1),(String)ESP.getCpuFreqMHz());