2018-01-01 18:56:07 +00:00
|
|
|
#ifndef __config
|
|
|
|
#define __config
|
2017-03-23 18:45:29 +00:00
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2018-01-08 20:58:22 +00:00
|
|
|
|
2018-01-01 18:56:07 +00:00
|
|
|
#define SerialDebug
|
2018-01-08 20:58:22 +00:00
|
|
|
|
|
|
|
#ifdef SerialDebug
|
2018-01-01 18:56:07 +00:00
|
|
|
static const uint32_t SerialDebugBaudrate = 115200;
|
|
|
|
static const uint32_t SerialDebugStartupDelay = 2000;
|
2018-01-08 20:58:22 +00:00
|
|
|
#endif
|
2017-04-16 11:40:34 +00:00
|
|
|
|
|
|
|
|
2018-01-08 20:58:22 +00:00
|
|
|
static const char* ConnectionSettingsFile = "/connection.json";
|
|
|
|
static const char* SystemSettingsFile = "/system.json";
|
2018-01-14 20:31:37 +00:00
|
|
|
static const char* StepsSettingsFile = "/steps.json";
|
|
|
|
static const char* TimeTriggerSettingsFile = "/timetriggers.json";
|
|
|
|
static const char* MotionTriggerSettingsFile = "/motiontriggers.json";
|
2018-01-04 21:53:16 +00:00
|
|
|
|
|
|
|
|
2018-01-08 20:58:22 +00:00
|
|
|
static const char* DefaultAPSSIDPrefix = "Stairs-";
|
2018-01-07 22:12:42 +00:00
|
|
|
|
2018-01-18 22:20:31 +00:00
|
|
|
static const char* DefaultNTPServer = "pool.ntp.org";
|
|
|
|
|
2018-01-08 20:58:22 +00:00
|
|
|
// Timeout when in AP + station mode (otherwise trying to connect
|
|
|
|
// to the STA will block the AP)
|
|
|
|
static const uint32_t StationModeTimeout = 30000;
|
2018-01-04 21:53:16 +00:00
|
|
|
|
2018-01-16 21:07:20 +00:00
|
|
|
static const uint16_t APButtonHoldTime = 5000;
|
|
|
|
|
2017-04-16 11:40:34 +00:00
|
|
|
|
2018-01-18 22:20:31 +00:00
|
|
|
// Only used if the timezone has not been succesfully retrieved yet, otherwise
|
|
|
|
// the configurable NTP interval is used
|
|
|
|
static const uint32_t TimezoneRetryInterval = 60000;
|
|
|
|
|
2018-01-19 15:12:23 +00:00
|
|
|
|
|
|
|
// SSL takes quite a bit of memory (and I haven't been optimizing much),
|
|
|
|
// which seems to cause memory-related exceptions when getting the timezone
|
|
|
|
// information from Google's HTTPS API. Google requires HTTPS. The workaround
|
|
|
|
// is hosting a small proxy script on HTTP, which is included in the "hosted" folder
|
|
|
|
// of this project. Note that this completely defeats any security, and may
|
|
|
|
// cause your Google API key and location data to leak. My advice is simply to not
|
|
|
|
// specify your location too precisely :-)
|
|
|
|
//
|
|
|
|
// If you want to host your own version of the script because you don't trust
|
|
|
|
// that mine will not log anything, or want to disable the proxy script
|
|
|
|
// completely, change these definitions below. Also update platformio-buildflags.bat
|
|
|
|
// to enable SSL support in ESPAsyncTCP.
|
|
|
|
//
|
|
|
|
// If you can fix my sloppy code and get a direct SSL connection working,
|
|
|
|
// I'd be interested in the changes as well!
|
|
|
|
#define MapsAPIViaProxyScript
|
|
|
|
|
|
|
|
#ifdef MapsAPIViaProxyScript
|
|
|
|
static const char* TimezoneProxyScriptHost = "api.x2software.net";
|
|
|
|
static const char* TimezoneProxyScriptPath = "/timezone.php";
|
|
|
|
#endif
|
|
|
|
|
2017-03-23 18:45:29 +00:00
|
|
|
#endif
|