Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

35 wiersze
891 B

  1. #pragma once
  2. #include <Arduino.h>
  3. #include <SIM808.Types.h>
  4. #define POSITION_SIZE 115
  5. struct PositionEntryMetadata {
  6. int8_t batteryLevel; //sizeof = 1
  7. int16_t batteryVoltage; //sizeof = 2
  8. int16_t temperature; //sizeof = 2
  9. uint16_t timeToFix; //sizeof = 2
  10. SIM808_GPS_STATUS status; //sizeof = 1
  11. }; //sizeof = 8
  12. struct PositionEntry {
  13. PositionEntryMetadata metadata; //sizeof = 8
  14. char position[POSITION_SIZE]; //sizeof = 115
  15. }; //sizeof = 123
  16. namespace positions {
  17. void setup();
  18. bool acquire(PositionEntryMetadata &metadata);
  19. void appendLast(const PositionEntryMetadata &metadata);
  20. bool get(uint16_t index, PositionEntry &entry);
  21. bool moveNext(uint16_t &index);
  22. uint16_t count(uint16_t fromIndex);
  23. void prepareBackup(bool force);
  24. void doBackup(bool force);
  25. void print(uint16_t index, PositionEntry &entry);
  26. }