From 5d043617348c1af8ba0e6cc1ae78bbe501e90f51 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Tue, 13 Jan 2026 18:24:48 +0100 Subject: [PATCH] Camera Activity: disable high resolutions --- internal_filesystem/lib/mpos/ui/camera_activity.py | 14 +++++++------- scripts/build_mpos.sh | 9 ++++++--- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/internal_filesystem/lib/mpos/ui/camera_activity.py b/internal_filesystem/lib/mpos/ui/camera_activity.py index fc9e686d..defc86ae 100644 --- a/internal_filesystem/lib/mpos/ui/camera_activity.py +++ b/internal_filesystem/lib/mpos/ui/camera_activity.py @@ -400,15 +400,15 @@ class CameraActivity(Activity): (960, 960): FrameSize.R960X960, (1024, 768): FrameSize.XGA, (1024,1024): FrameSize.R1024X1024, - (1280, 720): FrameSize.HD, - (1280, 1024): FrameSize.SXGA, - (1280, 1280): FrameSize.R1280X1280, - (1600, 1200): FrameSize.UXGA, - (1920, 1080): FrameSize.FHD, + #(1280, 720): FrameSize.HD, + #(1280, 1024): FrameSize.SXGA, + #(1280, 1280): FrameSize.R1280X1280, + #(1600, 1200): FrameSize.UXGA, + #(1920, 1080): FrameSize.FHD, } - frame_size = resolution_map.get((width, height), FrameSize.QVGA) - print(f"init_internal_cam: Using FrameSize for {width}x{height}") + frame_size = resolution_map.get((width, height), FrameSize.R240X240) + print(f"init_internal_cam: Using FrameSize {frame_size} for {width}x{height}") # Try to initialize, with one retry for I2C poweroff issue max_attempts = 3 diff --git a/scripts/build_mpos.sh b/scripts/build_mpos.sh index fa723b42..797c592b 100755 --- a/scripts/build_mpos.sh +++ b/scripts/build_mpos.sh @@ -34,13 +34,13 @@ echo "Patching $idfile"... echo "Check need to add esp32-camera..." if ! grep esp32-camera "$idfile"; then echo "Adding esp32-camera to $idfile" - echo " espressif/esp32-camera: + echo " mpos/esp32-camera: git: https://github.com/MicroPythonOS/esp32-camera" >> "$idfile" - echo "Resulting file:" - cat "$idfile" else echo "No need to add esp32-camera to $idfile" fi +echo "Resulting file:" +cat "$idfile" # Adding it doesn't hurt - it won't be used anyway as RLOTTIE is disabled in lv_conf.h echo "Check need to add esp_rlottie" @@ -114,6 +114,9 @@ if [ "$target" == "esp32" ]; then rm -rf lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/ python3 make.py --ota --partition-size=4194304 --flash-size=16 esp32 BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT DISPLAY=st7789 INDEV=cst816s USER_C_MODULE="$codebasedir"/micropython-camera-API/src/micropython.cmake USER_C_MODULE="$codebasedir"/secp256k1-embedded-ecdh/micropython.cmake USER_C_MODULE="$codebasedir"/c_mpos/micropython.cmake CONFIG_FREERTOS_USE_TRACE_FACILITY=y CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y "$frozenmanifest" popd + echo "Grepping..." + pwd + grep FrameSize.R480X480 -nril . elif [ "$target" == "unix" -o "$target" == "macOS" ]; then manifest=$(readlink -f "$codebasedir"/manifests/manifest.py) frozenmanifest="FROZEN_MANIFEST=$manifest"