From 9fddd27faa5a5c9177ee80c5e93498c2e14baf4e Mon Sep 17 00:00:00 2001 From: lenvm Date: Wed, 22 Nov 2023 21:59:04 +0100 Subject: [PATCH] display network information on webserver --- Software/src/devboard/webserver/webserver.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Software/src/devboard/webserver/webserver.cpp b/Software/src/devboard/webserver/webserver.cpp index a9664813..afc71502 100644 --- a/Software/src/devboard/webserver/webserver.cpp +++ b/Software/src/devboard/webserver/webserver.cpp @@ -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 += "

Output

"; + // Display ssid of network connected to and, if connected to the WiFi, its own IP + content += "

SSID: " + String(ssid) + "

"; + content += "

status: " + wifi_state + "

"; + if (wifi_connected == true) { + content += "

IP: " + WiFi.localIP().toString() + "

"; + } return content; } return String();