Skip to content
This repository was archived by the owner on Dec 14, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 42 additions & 2 deletions ESP/ini/boards.ini
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ upload_flags = --no-stub

[env:Babble-wrooms-s3]
board = esp32-s3-devkitc-1
board_build.flash_mode = qio ; qio_qspi
board_upload.flashsize = "4MB"
board_upload.flash_size=4MB
board_upload.maximum_size = 4194304
board_build.flash_mode = qio
board_build.arduino.memory_type = qio_qspi
build_type = debug
build_flags = ${env.build_flags}
Expand All @@ -200,9 +203,27 @@ build_flags = ${env.build_flags}
${pinoutSWROOMBABBLES3.build_flags}
upload_flags = --no-stub

[env:Babble-wrooms-s3_release]
board = esp32-s3-devkitc-1
board_upload.flashsize = "4MB"
board_upload.flash_size=4MB
board_upload.maximum_size = 4194304
board_build.flash_mode = qio
board_build.arduino.memory_type = qio_qspi
build_type = debug
build_flags = ${env.build_flags}
-DCORE_DEBUG_LEVEL=1
-DDEBUG_MODE=0
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
${pinoutSWROOMBABBLES3.build_flags}
upload_flags = --no-stub

[env:Babble_USB-wrooms-s3]
board = esp32-s3-devkitc-1
board_build.flash_mode = qio ; qio_qspi
board_upload.flashsize = "4MB"
board_upload.flash_size=4MB
board_upload.maximum_size = 4194304
board_build.flash_mode = qio
board_build.arduino.memory_type = qio_qspi
build_type = debug
build_flags = ${env.build_flags}
Expand All @@ -211,6 +232,25 @@ build_flags = ${env.build_flags}
-DETVR_EYE_TRACKER_USB_API
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
-DARDUINO_FLASH
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
${pinoutSWROOMBABBLES3.build_flags}
upload_flags = --no-stub

[env:Babble_USB-wrooms-s3_release]
board = esp32-s3-devkitc-1
board_upload.flashsize = "4MB"
board_upload.flash_size=4MB
board_upload.maximum_size = 4194304
board_build.flash_mode = qio
board_build.arduino.memory_type = qio_qspi
build_type = debug
build_flags = ${env.build_flags}
-DCORE_DEBUG_LEVEL=1
-DDEBUG_MODE=0
-DETVR_EYE_TRACKER_USB_API
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
${pinoutSWROOMBABBLES3.build_flags}
upload_flags = --no-stub
Expand Down
29 changes: 28 additions & 1 deletion ESP/lib/src/io/camera/cameraHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ void CameraHandler::setupCameraSensor() {
camera_sensor->set_aec2(camera_sensor, 0); // 0 = disable , 1 = enable
camera_sensor->set_ae_level(camera_sensor, 0); // -2 to 2
camera_sensor->set_aec_value(camera_sensor, 300); // 0 to 1200
// Use a lower aec value for babble to better isolate the face with illuminators
#ifdef CONFIG_CAMERA_MODULE_SWROOM_BABBLE_S3
camera_sensor->set_aec_value(camera_sensor, 100); // 0 to 1200
#endif

// controls the gain
camera_sensor->set_gain_ctrl(camera_sensor, 0); // 0 = disable , 1 = enable
Expand Down Expand Up @@ -195,7 +199,29 @@ void CameraHandler::loadConfigData() {
log_d("Loading camera config data done");
}

int CameraHandler::setCameraResolution(framesize_t frameSize) {
#ifdef CONFIG_CAMERA_MODULE_SWROOM_BABBLE_S3
int CameraHandler::setCameraResolution(framesize_t frameSize) { // For Babble, use a firmware crop as shown by Physdude
if (camera_sensor->pixformat == PIXFORMAT_JPEG) {
try {
int outputSize = 240;

int baseRes = 2; //CIF
int ROIsize = 240;
int startPointX = 80;
int startPointY = 28;

return camera_sensor->set_res_raw(camera_sensor, baseRes, 0, 0, 0, startPointX, startPointY, ROIsize, ROIsize, outputSize, outputSize, 0, 0);

} catch (...) {
// they sent us a malformed or unsupported frameSize - rather than crash -
// tell them about it
return -1;
}
}
return -1;
}
#else
int CameraHandler::setCameraResolution(framesize_t frameSize) { // By default, use the standard method.
if (camera_sensor->pixformat == PIXFORMAT_JPEG) {
try {
return camera_sensor->set_framesize(camera_sensor, frameSize);
Expand All @@ -207,6 +233,7 @@ int CameraHandler::setCameraResolution(framesize_t frameSize) {
}
return -1;
}
#endif

int CameraHandler::setVFlip(int direction) {
return camera_sensor->set_vflip(camera_sensor, direction);
Expand Down
Loading