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 -2
View File
@@ -1,8 +1,12 @@
#include <peripherals/peripherals.h>
Peripherals::Peripherals()
: endpoint(PeripheralsConfiguration::read, PeripheralsConfiguration::update, this),
_persistence(PeripheralsConfiguration::read, PeripheralsConfiguration::update, this, DEVICE_CONFIG_FILE) {
: protoEndpoint(PeripheralsConfiguration_read, PeripheralsConfiguration_update, this,
API_REQUEST_EXTRACTOR(peripheral_settings, api_PeripheralSettings),
API_RESPONSE_ASSIGNER(peripheral_settings, api_PeripheralSettings)),
_persistence(PeripheralsConfiguration_read, PeripheralsConfiguration_update, this,
PERIPHERAL_SETTINGS_FILE, api_PeripheralSettings_fields, api_PeripheralSettings_size,
PeripheralsConfiguration_defaults()) {
_accessMutex = xSemaphoreCreateMutex();
addUpdateHandler([&](const std::string &originId) { updatePins(); }, false);
}