mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-13 14:51:21 +10:00
add esp model and wifi mode status to info page headers
This commit is contained in:
+9
-4
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user