-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb.h
More file actions
48 lines (39 loc) · 1.46 KB
/
web.h
File metadata and controls
48 lines (39 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef _WEB_H
#define _WEB_H
#include <Arduino.h>
#include <ArduinoJson.h>
#include <AsyncJson.h>
#include "ESPAsyncWebServer.h"
class web {
public:
web();
void disable();
void loop();
void setup();
void start();
protected:
void eraseFlightLogs();
private:
bool _eraseFlightTaskStatus;
TaskHandle_t _eraseFlightsTaskHandle;
int _eraseFlightType;
File _fileLittleFS;
AsyncWebServer *_server = NULL;
void configure();
void serverHandleUpload(AsyncWebServerRequest *request, String filename, size_t index, uint8_t *data, size_t len, bool final);
void serverHandleUploadLittleFS(AsyncWebServerRequest *request, String filename, size_t index, uint8_t *data, size_t len, bool final);
void serverHandleUploadOTAUpdate(AsyncWebServerRequest *request, String filename, size_t index, uint8_t *data, size_t len, bool final);
void serverNotFound(AsyncWebServerRequest *request);
// String serverProcessor(const String& var);
void jsonAtmosphere(JsonObject root);
void jsonHeader(JsonObject root);
void jsonLaunch(JsonObject root, bool settings);
void jsonMonitor(JsonObject root);
void jsonSamples(JsonObject root, bool settings);
void jsonWifi(JsonObject root);
int _chunkedRead(File file, uint8_t* buffer, size_t maxLen, size_t index);
void _values(char *name, int values[], JsonArray valuesJson, int size);
static void eraseFlightLogsTaskW(void * parameter);
};
extern web _web;
#endif