Преглед изворни кода

update: easylvgl, 模拟器端jpg解码打开

zengeshuai пре 2 месеци
родитељ
комит
163d45e2bf

+ 1 - 1
bsp/pc/include/luat_conf_bsp.h

@@ -140,7 +140,7 @@
 // UI
 // LCD  是彩屏, 若使用LVGL就必须启用LCD
 #define LUAT_USE_LCD
-#define LUAT_USE_TJPGD
+// #define LUAT_USE_TJPGD
 // GT 字库:PC 模拟器仿真启用
 #define LUAT_USE_GTFONT 1
 // 若需要直接绘制 UTF8 字符串(lcd/u8g2 的 UTF8 接口),启用

+ 4 - 2
bsp/pc/xmake.lua

@@ -389,12 +389,14 @@ target("luatos-lua")
             add_files(luatos.."components/lvgl/**.c")
             -- 默认不编译lv的demos, 节省大量的编译时间
             remove_files(luatos.."components/lvgl/lv_demos/**.c")
+
+            -- tjpgd
+            add_includedirs(luatos.."components/tjpgd")
+            add_files(luatos.."components/tjpgd/*.c")
         end
 
         -- qrcode 和 tjpgd
         add_includedirs(luatos.."components/qrcode")
-        add_includedirs(luatos.."components/tjpgd")
-        add_files(luatos.."components/tjpgd/*.c")
         add_files(luatos.."components/qrcode/*.c")
 
         add_includedirs(luatos.."components/luatfonts")

+ 2 - 2
components/easylvgl/inc/luat_easylvgl_conf.h

@@ -20,7 +20,7 @@
     /* SDL2 平台配置 */
     #define LV_USE_OS   LV_OS_NONE  /* SDL2 平台可能不需要 OSAL */
 
-    #define LV_USE_LOG 0
+    #define LV_USE_LOG 1
     #define LV_LOG_LEVEL LV_LOG_LEVEL_INFO
 
     // 打开png支持
@@ -34,7 +34,7 @@
     #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(lv_font_misans_20) LV_FONT_DECLARE(lv_font_misans_14)
     
     // #define LV_FONT_DEFAULT &lv_font_misans_20
-    // #define LV_FONT_DEFAULT &lv_font_misans_14
+    #define LV_FONT_DEFAULT &lv_font_misans_14
 
 
 

+ 1 - 1
components/easylvgl/src/font/lv_font_misans_14.c

@@ -11,7 +11,7 @@
 #endif
 
 #ifndef LV_FONT_MISANS_14
-#define LV_FONT_MISANS_14 0
+#define LV_FONT_MISANS_14 1
 #endif
 
 #if LV_FONT_MISANS_14