Open 57Bravo opened 1 year ago
Good work! it looks very nice ! How many FPS can it achieve ? Could you share the LVGL project for the Beepberry ? Thanks.
Regards,
Xue
It just uses the main branch. No patches etc.
I'm not sure I could measure the live FPS, but subjectively, the updating is much more fluid on the live device. No real artifacts in the drawing or anything like that. Very usable and much better then I thought it would be.
That GIF was limited to 1 FPS in my video editing SW to make it smaller for posting etc.
Hi,
I did not make the lvgl running on Beepberry properly. Can you share your lv_conf.h and lv_drv_conf,h ? Thanks.
Sure. I'll post the configs this weekend when I have access to the machine with the code on it.
diff --git a/lv_drv_conf.h b/lv_drv_conf.h
index d40e703..db041b9 100644
--- a/lv_drv_conf.h
+++ b/lv_drv_conf.h
@@ -320,7 +320,7 @@
#endif
#if USE_FBDEV
-# define FBDEV_PATH "/dev/fb0"
+# define FBDEV_PATH "/dev/fb1"
#endif
/*-----------------------------------------
@@ -331,7 +331,7 @@
#endif
#if USE_BSD_FBDEV
-# define FBDEV_PATH "/dev/fb0"
+# define FBDEV_PATH "/dev/fb1"
#endif
/*-----------------------------------------
@@ -447,7 +447,7 @@
#endif
#if USE_EVDEV || USE_BSD_EVDEV
-# define EVDEV_NAME "/dev/input/event10" /*You can use the "evtest" Linux tool to get the list of devices and test them*/
+# define EVDEV_NAME "/dev/input/event0" /*You can use the "evtest" Linux tool to get the list of devices and test them*/
# define EVDEV_SWAP_AXES 0 /*Swap the x and y axes of the touchscreen*/
# define EVDEV_CALIBRATE 0 /*Scale and offset the touchscreen coordinates by using maximum and minimum values for each axis*/
diff --git a/lv_conf.h b/lv_conf.h
index 3137b1a..60dbd74 100644
--- a/lv_conf.h
+++ b/lv_conf.h
@@ -29,8 +29,19 @@ extern uint32_t custom_tick_get(void);
COLOR SETTINGS
*====================*/
+#define LV_USE_THEME_MONO 1
+#define LV_THEME_DEFAULT_INCLUDE <stdint.h> /*Include a header for the init. function*/
+#define LV_THEME_DEFAULT_INIT lv_theme_mono_init //lv_theme_material_init
+#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_WHITE //lv_color_hex(0x01a2b1)
+#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_BLACK //lv_color_hex(0x44d1b6)
+#define LV_THEME_DEFAULT_FLAG 0 //LV_THEME_MATERIAL_FLAG_LIGHT
+#define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_12
+#define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_16
+#define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_20
+#define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_24
+
/*Color depth: 1 (1 byte per pixel), 8 (RGB332), 16 (RGB565), 32 (ARGB8888)*/
-#define LV_COLOR_DEPTH 32
+#define LV_COLOR_DEPTH 1
/*Swap the 2 bytes of RGB565 color. Useful if the display has an 8-bit interface (e.g. SPI)*/
#define LV_COLOR_16_SWAP 0
@@ -147,7 +158,7 @@ extern uint32_t custom_tick_get(void);
/*Allow dithering the gradients (to achieve visual smooth color gradients on limited color depth display)
*LV_DITHER_GRADIENT implies allocating one or two more lines of the object's rendering surface
*The increase in memory consumption is (32 bits * object width) plus 24 bits * object width if using error diffusion */
-#define LV_DITHER_GRADIENT 0
+#define LV_DITHER_GRADIENT 1
#if LV_DITHER_GRADIENT
/*Add support for error diffusion dithering.
*Error diffusion dithering gets a much better visual result, but implies more CPU consumption and memory when drawing.
@@ -539,25 +550,6 @@ extern uint32_t custom_tick_get(void);
* Themes
*----------*/
-/*A simple, impressive and very complete theme*/
-#define LV_USE_THEME_DEFAULT 1
-#if LV_USE_THEME_DEFAULT
-
- /*0: Light mode; 1: Dark mode*/
- #define LV_THEME_DEFAULT_DARK 0
-
- /*1: Enable grow on press*/
- #define LV_THEME_DEFAULT_GROW 1
-
- /*Default transition time in [ms]*/
- #define LV_THEME_DEFAULT_TRANSITION_TIME 80
-#endif /*LV_USE_THEME_DEFAULT*/
-
-/*A very simple theme that is a good starting point for a custom theme*/
-#define LV_USE_THEME_BASIC 1
-
-/*A theme designed for monochrome displays*/
-#define LV_USE_THEME_MONO 1
/*-----------
* Layouts
Hi @57Bravo ,
Thanks for your patch. I would like to know that did you test the program with sharp-drm driver which is currently the default display driver ?
I change my lvgl configuration regarding your patch. But it is still not working. The program shows 4 parallel pictures on the display.
It can show something properly if I use LV_COLOR_DEPTH 32
@xueliu - no, you have to use that sharp patch at the top of this thread.
I'll tar my targets src files tonight and post them. I had to modify some of the examples too. You may find them helpful.
@xueliu - Here's the target src directories tar'd up. I didn't clean the builds, so you should clean/rebuild them first.
That "main.c" file in LVGL tar has all of the examples consolidated. Memory restrictions force you to load them in groups.
Sharp Driver https://drive.google.com/file/d/1UGPaher-F3o9U6Xwb3TCYzIWWgQEXh5m/view?usp=sharing
LVGL https://drive.google.com/file/d/1mlhjOqSZkcK-yUQX5p__S2dKgbv8E4r6/view?usp=sharing
I was able to get LGVL working on the beepberry, but I had to apply the attached patch to the Sharp display kernel module.
https://lvgl.io/
LGVL Demo's stitched together
Sharp Patch