Run larger screen on deskop

This commit is contained in:
Thomas Farstrike
2025-06-11 23:33:16 +02:00
parent b80e0903a9
commit 80de5df27d
2 changed files with 18 additions and 7 deletions
@@ -279,11 +279,14 @@ class ImageView(Activity):
def clear_image(self):
"""Clear current image or GIF source to free memory."""
if self.current_image_dsc:
self.current_image_dsc = None # Release reference to descriptor
self.image.set_src(None) # Clear image source
self.gif.set_src(None) # Clear GIF source
#if self.current_image_dsc:
# self.current_image_dsc = None # Release reference to descriptor
#self.image.set_src(None) # Clear image source
#self.gif.set_src(None) # Clear GIF source causes crash!
#self.gif.add_flag(lv.obj.FLAG.HIDDEN)
#self.image.remove_flag(lv.obj.FLAG.HIDDEN)
#lv.image_cache_invalidate_src(None) # Invalidate LVGL image cache
gc.collect() # Force garbage collection
# These 2 are needed to enable infinite slides with just 10MB RAM:
lv.image.cache_drop(None) # This helps a lot!
gc.collect() # Force garbage collection seems to fix memory alloc issues!
+10 -2
View File
@@ -13,8 +13,16 @@ import mpos.clipboard
#TFT_HOR_RES=640
#TFT_VER_RES=480
TFT_HOR_RES=320
TFT_VER_RES=240
#TFT_HOR_RES=320
#TFT_VER_RES=240
TFT_HOR_RES=1024
TFT_VER_RES=576
# Works:
#TFT_HOR_RES=1920
#TFT_VER_RES=1080
bus = lcd_bus.SDLBus(flags=0)