Camera api to protobuf - still and stream not tested

This commit is contained in:
Niklas Jensen
2026-01-30 14:30:42 +01:00
committed by nikguin04
parent 1a280f5356
commit e1f44a6f06
9 changed files with 146 additions and 154 deletions
+6 -5
View File
@@ -1,12 +1,12 @@
#pragma once
#include <ArduinoJson.h>
#include <esp_http_server.h>
#include <WiFi.h>
#include <features.h>
#include <template/stateful_persistence.h>
#include <template/stateful_endpoint.h>
#include <template/stateful_service.h>
#include <template/stateful_proto_endpoint.h>
#include <template/stateful_persistence_pb.h>
#include <settings/camera_settings.h>
@@ -19,6 +19,7 @@ namespace Camera {
#endif
#define PART_BOUNDARY "frame"
#define CAMERA_SETTINGS_FILE "/config/cameraSettings.pb"
camera_fb_t *safe_camera_fb_get();
sensor_t *safe_sensor_get();
@@ -33,10 +34,10 @@ class CameraService : public StatefulService<CameraSettings> {
esp_err_t cameraStill(httpd_req_t *request);
esp_err_t cameraStream(httpd_req_t *request);
StatefulHttpEndpoint<CameraSettings> endpoint;
StatefulProtoEndpoint<CameraSettings, api_CameraSettings> protoEndpoint;
private:
FSPersistence<CameraSettings> _persistence;
FSPersistencePB<CameraSettings> _persistence;
void updateCamera();
};
} // namespace Camera