configuration.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 MinLightThreshold 0
  11. #define MaxLightThreshold 1023
  12. #define LedBrightMin 0
  13. #define LedBrightMiddl 3
  14. #define LedBrightMax 7
  15. #define CLOCK_CONFIG_FILE ".clock.conf" // leading point for security reasons :)
  16. struct ClockConfig {
  17. ClockConfig()
  18. {
  19. AddTZ = 3;
  20. LightTrhLow = 341;
  21. LightTrhHigh = 683;
  22. BrightnessLow = 0;
  23. BrightnessMiddle = 3;
  24. BrightnessHigh = 7;
  25. }
  26. String NetworkSSID;
  27. String NetworkPassword;
  28. float AddTZ; // TimeZone - local time offset
  29. uint16_t LightTrhLow; // Low Light level
  30. uint16_t LightTrhHigh; // High Light level
  31. int8_t BrightnessLow; // Low LED brightness level
  32. int8_t BrightnessMiddle; // Middle LED brightness level
  33. int8_t BrightnessHigh; // High LED brightness level
  34. };
  35. ClockConfig loadConfig();
  36. void saveConfig(ClockConfig& cfg);
  37. extern ClockConfig ActiveConfig;
  38. #endif /* INCLUDE_CONFIGURATION_H_ */