-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfigManager.h
46 lines (32 loc) · 940 Bytes
/
ConfigManager.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
#ifndef CONFIGMANAGER_H // include guard
#define CONFIGMANAGER_H
#include <EEPROM.h>
#include <ESP8266WebServer.h>
class ConfigManager
{
public:
ConfigManager();
void update();
int timeOffsetHourInSeconds();
private:
const String form =
"<p>"
"<center>"
"<h1>WordClock Configuration</h1>"
"<h2>time zone settings</h2>"
"<form action='utc'><p>Enter offset to utc: <input type='text' name='utc' size=30 autofocus> <input type='submit' value='Submit'></form>"
"<h2>other settings</h2>"
"<form action='msg'><p>Other: <input type='text' name='msg' size=30 autofocus> <input type='submit' value='Submit'></form>"
"</center>";
ESP8266WebServer* server;
void handle_root();
void handle_utc();
void handle_other();
int eepromAddress = 0;
struct eeprom_settings {
int utc_offset = 1;
} s;
void getSettings();
void setSettings();
};
#endif /* CONFIGMANAGER_H */