mirror of
https://github.com/MrUnknownDE/OpenIris-ESPIDF.git
synced 2026-04-18 14:03:45 +02:00
Rewrite state manager, clean up states, fixup typos - todo test state display
This commit is contained in:
@@ -31,6 +31,9 @@ static esp_err_t UVCStreamHelpers::camera_start_cb(uvc_format_t format, int widt
|
||||
cameraHandler->setCameraResolution(frame_size);
|
||||
cameraHandler->resetCamera(0);
|
||||
|
||||
SystemEvent event = {EventSource::STREAM, StreamState_e::Stream_ON};
|
||||
xQueueSend(eventQueue, &event, 10);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
@@ -43,7 +46,8 @@ static void UVCStreamHelpers::camera_stop_cb(void *cb_ctx)
|
||||
s_fb.cam_fb_p = nullptr;
|
||||
}
|
||||
|
||||
ESP_LOGI(UVC_STREAM_TAG, "Camera Stop");
|
||||
SystemEvent event = {EventSource::STREAM, StreamState_e::Stream_OFF};
|
||||
xQueueSend(eventQueue, &event, 10);
|
||||
}
|
||||
|
||||
static uvc_fb_t *UVCStreamHelpers::camera_fb_get_cb(void *cb_ctx)
|
||||
|
||||
@@ -4,13 +4,19 @@
|
||||
#include "esp_timer.h"
|
||||
#include "esp_camera.h"
|
||||
#include <CameraManager.hpp>
|
||||
#include <StateManager.hpp>
|
||||
#include "esp_log.h"
|
||||
#include "usb_device_uvc.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/queue.h"
|
||||
|
||||
// we need access to the camera manager
|
||||
// in order to update the frame settings
|
||||
extern std::shared_ptr<CameraManager> cameraHandler;
|
||||
|
||||
// we also need a way to inform the rest of the system of what's happening
|
||||
extern QueueHandle_t eventQueue;
|
||||
|
||||
namespace UVCStreamHelpers
|
||||
{
|
||||
// TODO move the camera handling code to the camera manager and have the uvc maanger initialize it in wired mode
|
||||
|
||||
Reference in New Issue
Block a user