|
@@ -0,0 +1,41 @@
|
|
1
|
+#ifndef __CONFIG_H__
|
|
2
|
+#define __CONFIG_H__
|
|
3
|
+
|
|
4
|
+#define WEB_PORT 80
|
|
5
|
+#define BROADCAST_PORT 2390
|
|
6
|
+#define WEBSOCKET_PORT 2391
|
|
7
|
+#define NTP_PORT_FROM 2392
|
|
8
|
+#define NTP_PORT_TO 123
|
|
9
|
+
|
|
10
|
+// WiFi Credentials for the captive config portal AP
|
|
11
|
+#define DEFAULT_SSID "ESP-Weather"
|
|
12
|
+#define DEFAULT_PASS "testtest"
|
|
13
|
+
|
|
14
|
+#define MAX_BROADCAST_WAIT_TIME 550
|
|
15
|
+#define NTP_RETRY_TIMEOUT 2500
|
|
16
|
+#define NTP_SERVER_NAME "time.nist.gov"
|
|
17
|
+#define NTP_PACKET_SIZE 48
|
|
18
|
+#define UDP_PACKET_BUFFER_SIZE 25
|
|
19
|
+
|
|
20
|
+// Size of EEPROM for history storage.
|
|
21
|
+// 4096 should be ok, but too large values cause system crashes!
|
|
22
|
+#define EEPROM_SIZE 512
|
|
23
|
+
|
|
24
|
+// Broadcast Identifier. Change this when the protocol changes!
|
|
25
|
+#define UDP_PING_CONTENTS "pingESP8266v0.1"
|
|
26
|
+#define UDP_ECHO_CONTENTS "echoESP8266v0.1"
|
|
27
|
+
|
|
28
|
+// Using the RawGit.com service to serve the scripts directly from GitHub.
|
|
29
|
+// Consider using cdn.rawgit.com to reduce their server load.
|
|
30
|
+#define HTML_BEGIN "<html><head><title>ESP-Weather</title>\
|
|
31
|
+<script src=\"https://code.jquery.com/jquery-3.1.1.min.js\" integrity=\"sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=\" crossorigin=\"anonymous\"></script>\
|
|
32
|
+<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\" integrity=\"sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa\" crossorigin=\"anonymous\"></script>\
|
|
33
|
+<script src=\"https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.bundle.min.js\" integrity=\"sha256-RASNMNlmRtIreeznffYMDUxBXcMRjijEaaGF/gxT6vw=\" crossorigin=\"anonymous\"></script>\
|
|
34
|
+<script src=\"https://rawgit.com/xythobuz/ESP-Weather/master/client-script.js\"></script>\
|
|
35
|
+<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\" integrity=\"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u\" crossorigin=\"anonymous\">\
|
|
36
|
+</head><body><script type=\"text/javascript\">"
|
|
37
|
+
|
|
38
|
+#define HTML_END "</script></body></html>"
|
|
39
|
+
|
|
40
|
+#endif // __CONFIG_H__
|
|
41
|
+
|