configuration.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef INCLUDE_CONFIGURATION_H_
  2. #define INCLUDE_CONFIGURATION_H_
  3. #include <SmingCore.h>
  4. #include <JsonObjectStream.h>
  5. // If you want, you can define WiFi settings globally in Eclipse Environment Variables
  6. #ifndef WIFI_SSID
  7. #define WIFI_SSID "Heaven-WiFi" // Put your SSID and password here
  8. #define WIFI_PWD "Heaven-32847"
  9. #endif
  10. #define LedBrightMin 0
  11. #define LedBrightMiddl 3
  12. #define LedBrightMax 7
  13. #define CLOCK_CONFIG_FILE ".clock.conf" // leading point for security reasons :)
  14. struct ClockConfig {
  15. ClockConfig()
  16. {
  17. AddTZ = 3;
  18. BrightnessLow = LedBrightMin;
  19. BrightnessMiddle = LedBrightMiddl;
  20. BrightnessHigh = LedBrightMax;
  21. }
  22. String NetworkSSID;
  23. String NetworkPassword;
  24. float AddTZ; // TimeZone - local time offset
  25. int8_t BrightnessLow; // Low LED brightness level
  26. int8_t BrightnessMiddle; // Middle LED brightness level
  27. int8_t BrightnessHigh; // High LED brightness level
  28. };
  29. ClockConfig loadConfig();
  30. void saveConfig(ClockConfig& cfg);
  31. extern ClockConfig ActiveConfig;
  32. #endif /* INCLUDE_CONFIGURATION_H_ */