fix several thinks

pull/60/head
Miroslav Pivovarsky 2024-06-27 22:28:43 +02:00
parent 4fd16e3396
commit c88d352720
6 changed files with 16 additions and 19 deletions

View File

@ -52,11 +52,8 @@
#include "log.h" #include "log.h"
#include "connect.h" #include "connect.h"
#include "wifi_mngt.h" #include "wifi_mngt.h"
#include "stream.h"
#include "serial_cfg.h" #include "serial_cfg.h"
//#include "esp32s3eye_lcd.h"
void setup() { void setup() {
/* Serial port for debugging purposes */ /* Serial port for debugging purposes */
Serial.begin(SERIAL_PORT_SPEED); Serial.begin(SERIAL_PORT_SPEED);
@ -107,9 +104,6 @@ void setup() {
/* init class for communication with PrusaConnect */ /* init class for communication with PrusaConnect */
Connect.Init(); Connect.Init();
//Esp32Lcd LcdDisplay;
//LcdDisplay.draw_color(0x000000);
/* init wdg */ /* init wdg */
SystemLog.AddEvent(LogLevel_Info, F("Init WDG")); SystemLog.AddEvent(LogLevel_Info, F("Init WDG"));
esp_task_wdt_config_t twdt_config; esp_task_wdt_config_t twdt_config;

View File

@ -24,6 +24,8 @@
#include "log.h" #include "log.h"
#include "camera.h" #include "camera.h"
class Camera;
typedef struct { typedef struct {
camera_fb_t *fb; ///< pointer to frame buffer camera_fb_t *fb; ///< pointer to frame buffer
size_t index; ///< index of frame size_t index; ///< index of frame

View File

@ -29,18 +29,19 @@ Camera::Camera(Configuration* i_conf, Logs* i_log, int8_t i_FlashPin) {
CameraFlashPin = i_FlashPin; CameraFlashPin = i_FlashPin;
StreamOnOff = false; StreamOnOff = false;
frameBufferSemaphore = xSemaphoreCreateMutex(); frameBufferSemaphore = xSemaphoreCreateMutex();
/* Allocate memory for the frame buffer */
FrameBufferDuplicate = (camera_fb_t*)heap_caps_malloc(sizeof(camera_fb_t), MALLOC_CAP_SPIRAM); FrameBufferDuplicate = (camera_fb_t*)heap_caps_malloc(sizeof(camera_fb_t), MALLOC_CAP_SPIRAM);
if (FrameBufferDuplicate != NULL) { if (FrameBufferDuplicate != NULL) {
memset(FrameBufferDuplicate, 0, sizeof(camera_fb_t)); memset(FrameBufferDuplicate, 0, sizeof(camera_fb_t));
FrameBufferDuplicate->buf = NULL; FrameBufferDuplicate->buf = NULL;
} }
/* Allocate memory for the frame buffer */
FrameBufferExif = (camera_fb_t*)heap_caps_malloc(sizeof(camera_fb_t), MALLOC_CAP_SPIRAM); FrameBufferExif = (camera_fb_t*)heap_caps_malloc(sizeof(camera_fb_t), MALLOC_CAP_SPIRAM);
if (FrameBufferExif != NULL) { if (FrameBufferExif != NULL) {
memset(FrameBufferExif, 0, sizeof(camera_fb_t)); memset(FrameBufferExif, 0, sizeof(camera_fb_t));
FrameBufferExif->buf = NULL; FrameBufferExif->buf = NULL;
} }
StreamSendingPhoto = false; StreamSendingPhoto = false;
PhotoExifData.header = NULL; PhotoExifData.header = NULL;

View File

@ -23,7 +23,7 @@
#include "camera.h" #include "camera.h"
#include "cfg.h" #include "cfg.h"
#include "Certificate.h" #include "Certificate.h"
#include "server.h" #include "WebServer.h"
#include "connect_types.h" #include "connect_types.h"
class WiFiMngt; class WiFiMngt;

View File

@ -14,11 +14,11 @@
#define _MCU_CFG_H_ #define _MCU_CFG_H_
/* ----------------- CAMERA TYPE ---------------*/ /* ----------------- CAMERA TYPE ---------------*/
//#define AI_THINKER_ESP32_CAM #define AI_THINKER_ESP32_CAM true
#define ESP32_WROVER_DEV #define ESP32_WROVER_DEV false
//#define CAMERA_MODEL_ESP32_S3_CAM #define CAMERA_MODEL_ESP32_S3_CAM false
//#define CAMERA_MODEL_ESP32_S3_EYE_2_2 #define CAMERA_MODEL_ESP32_S3_EYE_2_2 false
//#CAMERA_MODEL_XIAO_ESP32_S3_CAM #define CAMERA_MODEL_XIAO_ESP32_S3_CAM false
/* ---------------- BASIC MCU CFG --------------*/ /* ---------------- BASIC MCU CFG --------------*/
#define SW_VERSION "1.1.0-rc1" ///< SW version #define SW_VERSION "1.1.0-rc1" ///< SW version

View File

@ -14,19 +14,19 @@
#include "mcu_cfg.h" #include "mcu_cfg.h"
#if defined(AI_THINKER_ESP32_CAM) #if (true == AI_THINKER_ESP32_CAM)
#include "module_AI_Thinker_ESP32-CAM.h" #include "module_AI_Thinker_ESP32-CAM.h"
#elif defined(ESP32_WROVER_DEV) #elif (true == ESP32_WROVER_DEV)
#include "module_ESP32-WROVER-DEV.h" #include "module_ESP32-WROVER-DEV.h"
#elif defined(CAMERA_MODEL_ESP32_S3_CAM) #elif (true == CAMERA_MODEL_ESP32_S3_CAM)
#include "module_ESP32_S3_CAM.h" #include "module_ESP32_S3_CAM.h"
#elif defined(CAMERA_MODEL_ESP32_S3_EYE_2_2) #elif (true == CAMERA_MODEL_ESP32_S3_EYE_2_2)
#include "module_ESP32-S3-EYE_2_2.h" #include "module_ESP32-S3-EYE_2_2.h"
#elif defined(CAMERA_MODEL_XIAO_ESP32_S3_CAM) #elif (true == CAMERA_MODEL_XIAO_ESP32_S3_CAM)
#include "module_XIAO_ESP32-S3-cam.h" #include "module_XIAO_ESP32-S3-cam.h"
#else #else