From 858df97372607d6a3d5040e37a499dfdb446163b Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Tue, 25 Nov 2025 08:23:07 +0100 Subject: [PATCH] Default to 320x240 --- .../com.micropythonos.camera/assets/camera_app.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal_filesystem/apps/com.micropythonos.camera/assets/camera_app.py b/internal_filesystem/apps/com.micropythonos.camera/assets/camera_app.py index 21e607a3..6e255f0d 100644 --- a/internal_filesystem/apps/com.micropythonos.camera/assets/camera_app.py +++ b/internal_filesystem/apps/com.micropythonos.camera/assets/camera_app.py @@ -19,7 +19,7 @@ import mpos.time class CameraApp(Activity): - width = 240 + width = 320 height = 240 # Resolution preferences @@ -52,15 +52,15 @@ class CameraApp(Activity): if not self.prefs: self.prefs = SharedPreferences("com.micropythonos.camera") - resolution_str = self.prefs.get_string("resolution", "240x240") + resolution_str = self.prefs.get_string("resolution", "320x240") try: width_str, height_str = resolution_str.split('x') self.width = int(width_str) self.height = int(height_str) print(f"Camera resolution loaded: {self.width}x{self.height}") except Exception as e: - print(f"Error parsing resolution '{resolution_str}': {e}, using default 240x240") - self.width = 240 + print(f"Error parsing resolution '{resolution_str}': {e}, using default 320x240") + self.width = 320 self.height = 240 def onCreate(self): @@ -356,7 +356,7 @@ class CameraApp(Activity): # Non-class functions: -def init_internal_cam(width=240, height=240): +def init_internal_cam(width=320, height=240): """Initialize internal camera with specified resolution.""" try: from camera import Camera, GrabMode, PixelFormat, FrameSize, GainCeiling @@ -383,7 +383,7 @@ def init_internal_cam(width=240, height=240): (1920, 1080): FrameSize.FHD, } - frame_size = resolution_map.get((width, height), FrameSize.R240X240) + frame_size = resolution_map.get((width, height), FrameSize.QVGA) print(f"init_internal_cam: Using FrameSize for {width}x{height}") cam = Camera( @@ -470,7 +470,7 @@ class CameraSettingsActivity(Activity): def onCreate(self): # Load preferences prefs = SharedPreferences("com.micropythonos.camera") - self.current_resolution = prefs.get_string("resolution", "240x240") + self.current_resolution = prefs.get_string("resolution", "320x240") # Create main screen screen = lv.obj()