Stairs/src/config.h

73 lines
2.2 KiB
C

/*
* Stairs
* Copyright 2017 (c) Mark van Renswoude
*
* https://git.x2software.net/pub/Stairs
*/
#ifndef __config
#define __config
#include <stdint.h>
// Enables debug information to be output through the standard
// Serial connection, disable in production units to improve performance
//#define SerialDebug
// Enables the crash API methods to cause crashes, you probably never
// want to leave this on unless you're debugging the exception handler
//#define EnableCrashAPI
#ifdef SerialDebug
extern const uint32_t SerialDebugBaudrate;
extern const uint32_t SerialDebugStartupDelay;
#endif
extern const char* ConnectionSettingsFile;
extern const char* SystemSettingsFile;
extern const char* StepsSettingsFile;
extern const char* TimeTriggerSettingsFile;
extern const char* MotionTriggerSettingsFile;
extern const char* DefaultAPSSIDPrefix;
extern const char* DefaultNTPServer;
extern const uint32_t StationModeTimeout;
extern const uint16_t APButtonHoldTime;
extern const uint32_t TimezoneRetryInterval;
// 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
extern const char* TimezoneProxyScriptHost;
extern const char* TimezoneProxyScriptPath;
#endif
extern const uint8_t InitialisationBrightness;
extern const uint8_t InitialisationFadeTime;
extern const uint8_t InitialisationBlinkCount;
#endif