♻️ Major clean up of project structure

This commit is contained in:
Rune Harlyk
2025-09-11 17:14:31 +02:00
committed by Rune Harlyk
parent 26c36b8302
commit 7fd35f3f48
25 changed files with 370 additions and 890 deletions
@@ -90,7 +90,7 @@ class FSPersistence {
JsonStateReader<T> _stateReader;
JsonStateUpdater<T> _stateUpdater;
StatefulService<T> *_statefulService;
FS *_fs {&ESPFS};
FS *_fs {&ESP_FS};
const char *_filePath;
size_t _bufferSize;
HandlerId _updateHandlerId;
+6 -6
View File
@@ -2,7 +2,7 @@
#include <PsychicHttp.h>
#include <event_socket.h>
// #include <event_socket.h>
#include <template/stateful_service.h>
template <class T>
@@ -15,10 +15,10 @@ class EventEndpoint {
}
void begin() {
socket.onEvent(_event,
std::bind(&EventEndpoint::updateState, this, std::placeholders::_1, std::placeholders::_2));
socket.onSubscribe(_event,
std::bind(&EventEndpoint::syncState, this, std::placeholders::_1, std::placeholders::_2));
// socket.onEvent(_event,
// std::bind(&EventEndpoint::updateState, this, std::placeholders::_1, std::placeholders::_2));
// socket.onSubscribe(_event,
// std::bind(&EventEndpoint::syncState, this, std::placeholders::_1, std::placeholders::_2));
}
private:
@@ -35,6 +35,6 @@ class EventEndpoint {
JsonDocument jsonDocument;
JsonVariant root = jsonDocument.to<JsonVariant>();
_statefulService->read(root, _stateReader);
socket.emit(_event, root, originId.c_str(), sync);
// socket.emit(_event, root, originId.c_str(), sync);
}
};