mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
display network information on webserver
This commit is contained in:
parent
34ab0a0900
commit
9fddd27faa
1 changed files with 6 additions and 1 deletions
|
@ -105,7 +105,12 @@ void init_WiFi_STA(const char* ssid, const char* password) {
|
|||
String processor(const String& var) {
|
||||
if (var == "PLACEHOLDER") {
|
||||
String content = "";
|
||||
content += "<h4>Output</h4>";
|
||||
// Display ssid of network connected to and, if connected to the WiFi, its own IP
|
||||
content += "<h4>SSID: " + String(ssid) + "</h4>";
|
||||
content += "<h4>status: " + wifi_state + "</h4>";
|
||||
if (wifi_connected == true) {
|
||||
content += "<h4>IP: " + WiFi.localIP().toString() + "</h4>";
|
||||
}
|
||||
return content;
|
||||
}
|
||||
return String();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue