🔥 Removes old stateful services

This commit is contained in:
Rune Harlyk
2026-02-01 00:30:08 +01:00
parent 780d178e87
commit 57e0aac2aa
12 changed files with 0 additions and 651 deletions
-8
View File
@@ -2,7 +2,6 @@
#include <wifi/wifi_idf.h>
#include <wifi/dns_server.h>
#include <template/state_result.h>
#include <platform_shared/api.pb.h>
#include <cstring>
@@ -75,10 +74,3 @@ inline APSettings APSettings_defaults() {
settings.subnet_mask = parseIPv4(FACTORY_AP_SUBNET_MASK);
return settings;
}
inline void APSettings_read(const APSettings &settings, APSettings &proto) { proto = settings; }
inline StateUpdateResult APSettings_update(const APSettings &proto, APSettings &settings) {
settings = proto;
return StateUpdateResult::CHANGED;
}
-11
View File
@@ -1,6 +1,5 @@
#pragma once
#include <template/state_result.h>
#include <platform_shared/api.pb.h>
#include <esp_camera.h>
@@ -45,14 +44,4 @@ inline CameraSettings CameraSettings_defaults() {
return settings;
}
// Proto read/update are identity functions since type is the same
inline void CameraSettings_read(const CameraSettings& settings, CameraSettings& proto) {
proto = settings;
}
inline StateUpdateResult CameraSettings_update(const CameraSettings& proto, CameraSettings& settings) {
settings = proto;
return StateUpdateResult::CHANGED;
}
} // namespace Camera
-11
View File
@@ -1,6 +1,5 @@
#pragma once
#include <template/state_result.h>
#include <platform_shared/api.pb.h>
#include <string>
#include <cstring>
@@ -45,13 +44,3 @@ inline MDNSSettings MDNSSettings_defaults() {
return settings;
}
// Proto read/update are identity functions since type is the same
inline void MDNSSettings_read(const MDNSSettings& settings, MDNSSettings& proto) {
proto = settings;
}
inline StateUpdateResult MDNSSettings_update(const MDNSSettings& proto, MDNSSettings& settings) {
settings = proto;
return StateUpdateResult::CHANGED;
}
-42
View File
@@ -1,42 +0,0 @@
#include <template/state_result.h>
#include <ArduinoJson.h>
#include <string>
#ifndef FACTORY_NTP_ENABLED
#define FACTORY_NTP_ENABLED true
#endif
#ifndef FACTORY_NTP_TIME_ZONE_LABEL
#define FACTORY_NTP_TIME_ZONE_LABEL "Europe/London"
#endif
#ifndef FACTORY_NTP_TIME_ZONE_FORMAT
#define FACTORY_NTP_TIME_ZONE_FORMAT "GMT0BST,M3.5.0/1,M10.5.0"
#endif
#ifndef FACTORY_NTP_SERVER
#define FACTORY_NTP_SERVER "time.google.com"
#endif
class NTPSettings {
public:
bool enabled;
std::string tzLabel;
std::string tzFormat;
std::string server;
static void read(NTPSettings &settings, JsonVariant &root) {
root["enabled"] = settings.enabled;
root["server"] = settings.server.c_str();
root["tz_label"] = settings.tzLabel.c_str();
root["tz_format"] = settings.tzFormat.c_str();
}
static StateUpdateResult update(JsonVariant &root, NTPSettings &settings) {
settings.enabled = root["enabled"] | FACTORY_NTP_ENABLED;
settings.server = root["server"] | FACTORY_NTP_SERVER;
settings.tzLabel = root["tz_label"] | FACTORY_NTP_TIME_ZONE_LABEL;
settings.tzFormat = root["tz_format"] | FACTORY_NTP_TIME_ZONE_FORMAT;
return StateUpdateResult::CHANGED;
}
};
@@ -1,6 +1,5 @@
#pragma once
#include <template/state_result.h>
#include <platform_shared/api.pb.h>
/*
@@ -29,14 +28,3 @@ inline PeripheralsConfiguration PeripheralsConfiguration_defaults() {
settings.pins_count = 0;
return settings;
}
// Proto read/update are identity functions since type is the same
inline void PeripheralsConfiguration_read(const PeripheralsConfiguration& settings, PeripheralsConfiguration& proto) {
proto = settings;
}
inline StateUpdateResult PeripheralsConfiguration_update(const PeripheralsConfiguration& proto,
PeripheralsConfiguration& settings) {
settings = proto;
return StateUpdateResult::CHANGED;
}
-8
View File
@@ -1,7 +1,6 @@
#pragma once
#include <wifi/wifi_idf.h>
#include <template/state_result.h>
#include <platform_shared/api.pb.h>
#include <cstring>
@@ -49,10 +48,3 @@ inline WiFiSettings WiFiSettings_defaults() {
}
return settings;
}
inline void WiFiSettings_read(const WiFiSettings &settings, WiFiSettings &proto) { proto = settings; }
inline StateUpdateResult WiFiSettings_update(const WiFiSettings &proto, WiFiSettings &settings) {
settings = proto;
return StateUpdateResult::CHANGED;
}