54 static std::string nextFreeFilePath();
64 std::string _filePath;
67 static constexpr uint16_t kBufBytes = 512;
68 static constexpr uint16_t kFlushLines = 64;
69 static constexpr uint32_t kFlushMs = 200;
72 char _buf[kBufBytes] = {};
74 uint16_t _linesPending = 0;
75 uint32_t _lastFlushMs = 0;
76 uint32_t _lastSyncMs = 0;
constexpr uint32_t SYNC_INTERVAL_MS
constexpr size_t PRE_ALLOCATE_SIZE_MB
constexpr size_t BYTES_PER_MB
constexpr size_t FILE_PATH_BUFFER_SIZE
Timestamped float measurement container.
bool begin()
Initialize the SD card and open a streaming file. Returns true on success.
void end()
Flush pending bytes and close the file.
int saveDataPoint(const DataPoint &dataPoint, uint8_t name) override
Buffer a CSV line (timestamp,name,value) and flush in batches.
DataSaverBigSD(uint8_t csPin=5)
Abstract interface for persisting timestamped data points.