Added wifi state output as version.

This commit is contained in:
2026-03-13 15:52:36 +01:00
parent f55dab7546
commit 303423a5a5
3 changed files with 10 additions and 7 deletions

View File

@@ -3,6 +3,8 @@
#include <DNSServer.h>
#include <string.h>
String g_strConnectionState = "No Wifi connection";
namespace
{
const char *kConfigPath = "/config.json";
@@ -594,7 +596,8 @@ void startWebInterface()
staConnectionKnown = staConnected;
if (staConnected)
{
Serial.println(String("Connected: http://") + WiFi.localIP().toString());
g_strConnectionState = String("Connected: http://") + WiFi.localIP().toString();
Serial.println(g_strConnectionState);
}
else
{
@@ -620,7 +623,8 @@ void startWebInterface()
{
apModeActive = true;
dnsServer.start(kDnsPort, "*", WiFi.softAPIP());
Serial.println(String("AP aktiv: ") + hostName + " / http://" + WiFi.softAPIP().toString() + " (Name: " + hostName + ")");
g_strConnectionState = String("AP aktiv: http://" + WiFi.softAPIP().toString() + " (" + hostName + ")");
Serial.println(g_strConnectionState);
}
else
{

View File

@@ -318,11 +318,12 @@ void stepperModeConfigure()
void sendVersion()
{
Log(__FUNCTION__);
protocolWrite(initSting);
Log(__FUNCTION__);
protocolWrite("EBB: " + g_strConnectionState);
protocolWrite("\r\n");
}
void unrecognized(const char *command)
{
Log(__FUNCTION__);