This repository was archived by the owner on Dec 14, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ build_flags =
4646
4747 ' -DOTA_PASSWORD=${ota.otapassword}' ; Set the OTA password
4848 ' -DOTA_LOGIN=${ota.otalogin}'
49+ ' -DCAM_RESOLUTION=${cam.resolution}'
4950
5051 -O2 ; optimize for speed
5152 -DASYNCWEBSERVER_REGEX ; enable regex in asyncwebserver
Original file line number Diff line number Diff line change @@ -18,3 +18,6 @@ otapassword = "12345678"
1818
1919[development]
2020serial_flush_enabled = 0
21+
22+ [cam]
23+ resolution = FRAMESIZE_240X240
Original file line number Diff line number Diff line change 11#include " project_config.hpp"
2+ #include " sensor.h"
23
34ProjectConfig::ProjectConfig (const std::string& name,
45 const std::string& mdnsName)
@@ -53,7 +54,7 @@ void ProjectConfig::initConfig() {
5354 this ->config .camera = {
5455 .vflip = 0 ,
5556 .href = 0 ,
56- .framesize = 4 ,
57+ .framesize = ( uint8_t ) CAM_RESOLUTION ,
5758 .quality = 7 ,
5859 .brightness = 2 ,
5960 };
@@ -200,7 +201,7 @@ void ProjectConfig::load() {
200201 /* Camera Config */
201202 this ->config .camera .vflip = getInt (" vflip" , 0 );
202203 this ->config .camera .href = getInt (" href" , 0 );
203- this ->config .camera .framesize = getInt (" framesize" , 4 );
204+ this ->config .camera .framesize = getInt (" framesize" , ( uint8_t ) CAM_RESOLUTION );
204205 this ->config .camera .quality = getInt (" quality" , 7 );
205206 this ->config .camera .brightness = getInt (" brightness" , 2 );
206207
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ void CameraHandler::setupCameraPinout() {
6363
6464void CameraHandler::setupBasicResolution () {
6565 config.pixel_format = PIXFORMAT_JPEG ;
66- config.frame_size = FRAMESIZE_240X240 ;
66+ config.frame_size = CAM_RESOLUTION ;
6767
6868 if (!psramFound ()) {
6969 log_e (" [Camera]: Did not find psram, setting lower image quality" );
You can’t perform that action at this time.
0 commit comments