add simple web server for configuration

This commit is contained in:
technyon
2022-03-27 09:41:19 +02:00
parent 38b5af5421
commit 5941a98f7e
4 changed files with 178 additions and 0 deletions

28
WebCfgServer.h Normal file
View File

@@ -0,0 +1,28 @@
#pragma once
#include <WiFiServer.h>
enum class TokenType
{
NONE,
MQTT_SERVER,
};
class WebCfgServer
{
public:
WebCfgServer();
~WebCfgServer() = default;
void initialize();
void update();
private:
void serveHtml(WiFiClient& client);
TokenType getParameterType(char*& token);
WiFiServer _wifiServer;
bool _enabled = true;
};