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

View File

@ -24,6 +24,8 @@
#include "log.h"
#include "camera.h"
class Camera;
typedef struct {
camera_fb_t *fb; ///< pointer to frame buffer
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;
StreamOnOff = false;
frameBufferSemaphore = xSemaphoreCreateMutex();
/* Allocate memory for the frame buffer */
FrameBufferDuplicate = (camera_fb_t*)heap_caps_malloc(sizeof(camera_fb_t), MALLOC_CAP_SPIRAM);
if (FrameBufferDuplicate != NULL) {
memset(FrameBufferDuplicate, 0, sizeof(camera_fb_t));
FrameBufferDuplicate->buf = NULL;
}
/* Allocate memory for the frame buffer */
FrameBufferExif = (camera_fb_t*)heap_caps_malloc(sizeof(camera_fb_t), MALLOC_CAP_SPIRAM);
if (FrameBufferExif != NULL) {
memset(FrameBufferExif, 0, sizeof(camera_fb_t));
FrameBufferExif->buf = NULL;
}
StreamSendingPhoto = false;
PhotoExifData.header = NULL;

View File

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

View File

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

View File

@ -14,19 +14,19 @@
#include "mcu_cfg.h"
#if defined(AI_THINKER_ESP32_CAM)
#if (true == AI_THINKER_ESP32_CAM)
#include "module_AI_Thinker_ESP32-CAM.h"
#elif defined(ESP32_WROVER_DEV)
#elif (true == ESP32_WROVER_DEV)
#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"
#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"
#elif defined(CAMERA_MODEL_XIAO_ESP32_S3_CAM)
#elif (true == CAMERA_MODEL_XIAO_ESP32_S3_CAM)
#include "module_XIAO_ESP32-S3-cam.h"
#else