forked from Akcelerometry_drgania_WMT/PI_mikrokontroler
Wgranie zmian do repozytorium
This commit is contained in:
31
releases/v1.4.2.2/include/UploadManager.h
Normal file
31
releases/v1.4.2.2/include/UploadManager.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef UPLOADMANAGER_H
|
||||
#define UPLOADMANAGER_H
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <FS.h>
|
||||
#include <SD.h>
|
||||
#include "APIClient.h"
|
||||
#include "RTClib.h"
|
||||
#include "Measure.h"
|
||||
|
||||
class UploadManager {
|
||||
public:
|
||||
UploadManager(APIClient& client, RTC_DS3231& rtc, DataCapture& capture);
|
||||
|
||||
// Call this to upload a specific file immediately
|
||||
void uploadFile(const String& filePath);
|
||||
|
||||
// Call this in the background when WiFi is connected
|
||||
void processPendingUploads();
|
||||
|
||||
private:
|
||||
APIClient& apiClient;
|
||||
RTC_DS3231& rtc_;
|
||||
DataCapture& capture_;
|
||||
|
||||
bool isAlreadyUploaded(const String& filePath);
|
||||
void appendLog(const String& filePath, const String& status);
|
||||
String getCurrentTimestamp();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user