Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

35 linhas
717 B

  1. #pragma once
  2. #include <Arduino.h>
  3. #define POSITIONS_FOLDER "positions"
  4. #define POSITIONS_FILENAME "positions-%05d.csv"
  5. #define POSITIONS_FILENAME_LENGTH 19
  6. #define POSITIONS_CONFIG_FILENAME "positions.config"
  7. #define POSITIONS_CONFIG_SEED 45
  8. #define POSITIONS_CONFIG_DEFAULT_SAVE_THRESHOLD 10
  9. #define POSITIONS_CONFIG_DEFAULT_MAX_RECORDS_PER_FILE 5
  10. struct SdPositionConfig_t {
  11. uint8_t seed;
  12. uint8_t saveThreshold;
  13. uint8_t maxRecordsPerFile;
  14. uint16_t lastSavedEntry;
  15. uint16_t fileIndex;
  16. uint32_t filePosition;
  17. size_t fileRecords;
  18. };
  19. namespace config {
  20. namespace backup {
  21. namespace sd {
  22. void setup();
  23. SdPositionConfig_t get();
  24. void set(SdPositionConfig_t config);
  25. void reset();
  26. }
  27. }
  28. }