some big change using state machine

This commit is contained in:
2025-08-28 15:58:50 +02:00
parent 7cdf5d4682
commit 83d589a3ec
9 changed files with 122 additions and 45 deletions

View File

@@ -1,12 +1,13 @@
#include <Arduino.h>
#include <string_view>
#include "wifimanager.h"
class Network {
public:
Network(std::string hostname, std::string apSsid = "Smart RGB");
Network(std::string_view hostname, std::string_view apSsid = "Smart RGB");
bool isConnected() const;
std::string getHostname() const;
bool setHostname(const std::string &hostname);
bool setHostname(const std::string_view &hostname);
void registerMDNS();
private:
static WIFIMANAGER WifiManager;
@@ -25,6 +26,6 @@ private:
<p><small>ESP32 WiFi Manager (c) 2022-2025 by Martin Verges</small></p>
</body></html>
)html";
std::string hostname;
std::string apSsid; // SSID for the fallback AP
std::string_view hostname;
std::string_view apSsid; // SSID for the fallback AP
};