Unused and untested peripheral endpoint updated to protobufs

This commit is contained in:
Niklas Jensen
2026-01-30 15:08:26 +01:00
committed by nikguin04
parent 72e2522dcd
commit 56d81f75cb
7 changed files with 98 additions and 54 deletions
+6 -4
View File
@@ -1,15 +1,17 @@
#pragma once
#include <template/stateful_persistence.h>
#include <template/stateful_persistence_pb.h>
#include <template/stateful_service.h>
#include <template/stateful_proto_endpoint.h>
#include <utils/math_utils.h>
#include <utils/timing.h>
#include <filesystem.h>
#include <features.h>
#include <settings/peripherals_settings.h>
#include <template/stateful_endpoint.h>
#include <platform_shared/message.pb.h>
#define PERIPHERAL_SETTINGS_FILE "/config/peripheralSettings.pb"
#include <list>
#include <NewPing.h>
@@ -64,10 +66,10 @@ class Peripherals : public StatefulService<PeripheralsConfiguration> {
bool calibrateIMU();
StatefulHttpEndpoint<PeripheralsConfiguration> endpoint;
StatefulProtoEndpoint<PeripheralsConfiguration, api_PeripheralSettings> protoEndpoint;
private:
FSPersistence<PeripheralsConfiguration> _persistence;
FSPersistencePB<PeripheralsConfiguration> _persistence;
SemaphoreHandle_t _accessMutex;
inline void beginTransaction() { xSemaphoreTakeRecursive(_accessMutex, portMAX_DELAY); }