Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

49 řádky
818 B

  1. #pragma once
  2. #include <Arduino.h>
  3. #define BACKUP_ENABLE_SDCARD 0
  4. #define BACKUP_ENABLE_NETWORK 1
  5. #define CONFIG_ADDR 0
  6. #define CONFIG_RESERVED_SIZE 128
  7. #define CONFIG_SEED 13
  8. #define VERSION "1.00"
  9. #define SLEEP_DEFAULT_TIME_SECONDS 1800
  10. #define GPS_DEFAULT_INTERMEDIATE_TIMEOUT_MS 10000
  11. #define GPS_DEFAULT_TOTAL_TIMEOUT_MS 180000
  12. struct sleepTimings_t {
  13. uint8_t speed;
  14. uint16_t seconds;
  15. };
  16. struct Config_t {
  17. uint8_t seed;
  18. char version[5];
  19. uint16_t firstEntry;
  20. uint16_t lastEntry;
  21. };
  22. namespace config {
  23. static const sleepTimings_t defaultSleepTimings[] PROGMEM = {
  24. { 5, SLEEP_DEFAULT_TIME_SECONDS },
  25. { 10, 1200 },
  26. { 20, 600 },
  27. { 30, 540 },
  28. { 50, 480 },
  29. { 80, 240 },
  30. { 100, 210 },
  31. { 180, 180 },
  32. };
  33. namespace main {
  34. Config_t get();
  35. void set(const Config_t config);
  36. void reset();
  37. }
  38. }