-
Notifications
You must be signed in to change notification settings - Fork 1
/
webConfig.h
48 lines (38 loc) · 1.31 KB
/
webConfig.h
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 __webConfig__
#define __webConfig__
#include "global.h"
#include "memory.h"
//// cd data
//// for file in `ls -A1 -I gz -I .directory`; do gzip -c $file > gz/$file.gz ; xxd -i gz/$file.gz ../webEmbed_$file.h; sed -i -- 's/unsigned char/const char/g; s/\[\] =/\[\] PROGMEM =/g' ../webEmbed_$file.h; done
#include "webEmbed_edit.htm.h"
#include "webEmbed_favicon.ico.h"
#include "webEmbed_graphs.js.h"
#include "webEmbed_icone57.png.h"
#include "webEmbed_index.htm.h"
#include "webEmbed_logo.png.h"
#include "webEmbed_ace.js.h"
#include <ESP8266WebServer.h>
#include <ESP8266HTTPClient.h>
//#include <ArduinoOTA.h>
#include <ESP8266HTTPUpdateServer.h>
//#include <ESP8266mDNS.h>
#include <ESP8266Ping.h>
ESP8266HTTPUpdateServer httpUpdater;
ESP8266WebServer server(80);
//holds the current upload
File fsUploadFile;
const char contentTypehtml[] PROGMEM = "text/html";
const char contentTypejs[] PROGMEM = "application/javascript";
const char contentTypepng[] PROGMEM = "image/png";
const char contentTypeico[] PROGMEM = "image/x-icon";
void webConfigInit();
void initWebServer();
String formatBytes(size_t bytes);
String getContentType(String filename);
bool handleFileRead(String path);
void handleFileUpload();
void handleFileDelete();
void handleFileCreate();
void handleFileList();
void delayWithWebHandle(int d);
#endif