PicoLowLevel
Loading...
Searching...
No Matches
WebManagement.h
Go to the documentation of this file.
1#ifndef WebManagement_h
2#define WebManagement_h
3
4#include <WiFi.h>
5#include <WiFiClient.h>
6#include <WebServer.h>
7#include <LEAmDNS.h>
8#include <LittleFS.h>
9#include <ArduinoOTA.h>
10#include "Debug.h"
11
12#include "html.h"
13#include "definitions.h"
14
19public:
20 WebManagement(String configFile) : confFile(configFile), server(80) {}
21 void begin(const char* ssid, const char* password, const char* hostname);
22 void handle();
23private:
24 void setupServer();
25 void setupOTA(const char* hostname);
26
27 void handleUpdate();
28 void handleConfig();
29
30 String readFile(String path);
31
32 String confFile;
33 File tempFile;
34 WebServer server;
35};
36
37#endif
Provides a class for managing a WiFi connection and HTTP server for remote firmware updates and confi...
Definition WebManagement.h:18
void begin(const char *ssid, const char *password, const char *hostname)
Initializes the WiFi connection, mDNS, OTA, and HTTP server.
Definition WebManagement.cpp:9
void handle()
Handles incoming HTTP requests and OTA updates.
Definition WebManagement.cpp:27
WebManagement(String configFile)
Definition WebManagement.h:20