You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 regels
696 B

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