60 lines
2.1 KiB
C
60 lines
2.1 KiB
C
#ifndef __config
|
|
#define __config
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
//#define SerialDebug
|
|
|
|
#ifdef SerialDebug
|
|
static const uint32_t SerialDebugBaudrate = 115200;
|
|
static const uint32_t SerialDebugStartupDelay = 2000;
|
|
#endif
|
|
|
|
|
|
static const char* ConnectionSettingsFile = "/connection.json";
|
|
static const char* SystemSettingsFile = "/system.json";
|
|
static const char* StepsSettingsFile = "/steps.json";
|
|
static const char* TimeTriggerSettingsFile = "/timetriggers.json";
|
|
static const char* MotionTriggerSettingsFile = "/motiontriggers.json";
|
|
|
|
|
|
static const char* DefaultAPSSIDPrefix = "Stairs-";
|
|
|
|
static const char* DefaultNTPServer = "pool.ntp.org";
|
|
|
|
// Timeout when in AP + station mode (otherwise trying to connect
|
|
// to the STA will block the AP)
|
|
static const uint32_t StationModeTimeout = 30000;
|
|
|
|
static const uint16_t APButtonHoldTime = 5000;
|
|
|
|
|
|
// Only used if the timezone has not been succesfully retrieved yet, otherwise
|
|
// the configurable NTP interval is used
|
|
static const uint32_t TimezoneRetryInterval = 60000;
|
|
|
|
|
|
// 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
|
|
|
|
#endif |