Support both ov2640 and ov3660 with esp_video (#1695)

* Support both ov2640 and ov3660 with esp_video

* Use configuration to set up the use of cameras ov3660 and ov2640
This commit is contained in:
HonestQiao
2026-01-27 19:12:23 +08:00
committed by GitHub
parent 62b93f986f
commit 7fa9056527
3 changed files with 39 additions and 2 deletions

View File

@ -5,6 +5,8 @@
#include "button.h"
#include "config.h"
#include "esp_video.h"
#include "mcp_server.h"
#include "settings.h"
#include "led/gpio_led.h"
#include <esp_log.h>
@ -71,7 +73,14 @@ class DfrobotEsp32S3AiCam : public WifiBoard {
};
camera_ = new EspVideo(video_config);
camera_->SetVFlip(1);
#if ( CONFIG_CAMERA_OV3660 )
camera_->SetVFlip(true);
camera_->SetHMirror(true);
#elif ( CONFIG_CAMERA_OV2640 )
camera_->SetVFlip(false);
camera_->SetHMirror(false);
#endif
}
public: