Started an LVGL Project but have issues with touch and not booting

Hi all, I am migrating an old ardunio project with a 2 line lcd segment display and rotary encoded to a touch screen, I have started by creating the LVGL gui and will do the actual function logic later.

I am having trouble with touch inputs swipes etc. I think there are 3 main issues. One is detecting swipes, a lot of the time it just doesn’t detect them.

The other is with a slider widget when using the slider widget it regularly bounces back to the max value both the slider and the value.

The other issue is that when I flash the device or reboot by monitoring it works fine however if I use the rst button or power off the device it only shows the home screen maybe 1 in 10 times. the rest of the time is just a blank screen (lcd is one can see the backlight)

I have tried added 1000ms delays between all the inits and the first call to the gui

Code is here…

Waveshare ESP32-S3 2.1

LVGL version is 8.2.0

I’ll try to upload a video thanks.

https://youtube.com/shorts/GiigeZ0w3KM?si=D29daKll8pGFutgx

Added some displays can I think I can see the issue with the touch it is giving some really high readings mixed in with sensible ones.

I have ‘fixed’ by ignoring these out of bounds values but it is not ideal.

It behaves much better now. but still not perfect. Is there a better way?

I (21829) screen_mgr: animate_transition: out=0x3fcee6a0 in=0x3fcedbcc transition=4
I (21839) screen_mgr: Navigation complete. current_screen is now 3
W (21879) LVGL: Touch OUT OF RANGE: X=2867 Y=189 (max 480x480) - discarded
W (24739) LVGL: Touch OUT OF RANGE: X=2925 Y=184 (max 480x480) - discarded
I (24769) LVGL: X=110 Y=184
I (24799) LVGL: X=121 Y=183
I (24829) LVGL: X=159 Y=180
W (24859) LVGL: Touch OUT OF RANGE: X=3004 Y=178 (max 480x480) - discarded
W (24889) LVGL: Touch OUT OF RANGE: X=2824 Y=169 (max 480x480) - discarded
W (26239) LVGL: Touch OUT OF RANGE: X=2921 Y=176 (max 480x480) - discarded
W (26269) LVGL: Touch OUT OF RANGE: X=2921 Y=176 (max 480x480) - discarded
W (26299) LVGL: Touch OUT OF RANGE: X=2923 Y=176 (max 480x480) - discarded
I (26329) LVGL: X=111 Y=176
I (26359) LVGL: X=151 Y=179
I (26389) LVGL: X=256 Y=188
I (26389) screen_mgr: Gesture detected at y=188 (half=240)
I (26389) screen_mgr: Swipe RIGHT on screen 3
I (26389) screen_mgr: NAV: spray duration → trigger temp
I (26389) screen_mgr: navigate() called: from screen 3 to screen 2, transition=4
I (26399) screen_mgr: Screen 2 already exists, container=0x3fcedb70
I (26409) screen_mgr: Animating transition: out=0x3fcedbcc in=0x3fcedb70
I (26409) screen_mgr: animate_transition: out=0x3fcedbcc in=0x3fcedb70 transition=4
I (26419) screen_mgr: Navigation complete. current_screen is now 2
I (41429) screen_mgr: navigate() called: from screen 2 to screen 0, transition=4
I (41429) screen_mgr: Screen 0 already exists, container=0x3fced1d4
I (41429) screen_mgr: Animating transition: out=0x3fcedb70 in=0x3fced1d4
I (41429) screen_mgr: animate_transition: out=0x3fcedb70 in=0x3fced1d4 transition=4
I (41439) screen_mgr: Navigation complete. current_screen is now 0
W (46119) LVGL: Touch OUT OF RANGE: X=2882 Y=194 (max 480x480) - discarded
W (52879) LVGL: Touch OUT OF RANGE: X=2882 Y=194 (max 480x480) - discarded
W (62359) LVGL: Touch OUT OF RANGE: X=2882 Y=194 (max 480x480) - discarded

Primary LVGL isnt thread safe , read docs about use multitask or use only one.