added handler for PUT /config

This commit is contained in:
RaffaelW 2024-11-02 19:28:14 +01:00
parent 7b7ecec534
commit 8fed61f78c
4 changed files with 198 additions and 27 deletions

35
src/routes/config.h Normal file
View file

@ -0,0 +1,35 @@
#pragma once
#include <ESPAsyncWebServer.h>
#include <ESPDMX.h>
#include <Preferences.h>
// #ifndef CONFIG_h
// #define CONFIG_h
extern Preferences config;
enum IpMethod
{
Static,
DHCP
};
enum Connection
{
WiFiSta,
WiFiAP,
Ethernet
};
enum Direction
{
Input,
Output
};
void onGetConfig(String ssid, String pwd, uint32_t ip, uint8_t universe, AsyncWebServerRequest *request);
void onPutConfig(AsyncWebServerRequest *request, uint8_t *data, size_t len, size_t index, size_t total);
// #endif