Replies: 1 comment
-
After getting nowhere with this, I decided to try and move on to figuring out sleep/standby. For some reason, adding the following code after my screen setup code has remedied the button repeating issue.
So my theory of "I don't know how to set things up properly" is holding so far, if I figure out the tearing issue I will try to explain that too. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I ask these questions together because they may both be related to me not having configured things correctly.
I am using an ESP32-S3 with a touch screen (https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-7). After previous help from here I managed to get the display and touch control working. However, there are some minor annoyances that I would like to resolve if possible.
With the display, I have tried to use double buffering to remove screen tearing, however it doesn't seem to quite work. I have added two videos, the first showing with one frame buffer, and the second with two. Also visible in the video is that when buttons and touchareas are held, they repeatedly get pressed and unpressed at a random interval.
https://github.com/user-attachments/assets/c88ed948-22ac-4bc7-b26c-68d01b38b648
https://github.com/user-attachments/assets/50b953fd-bed7-4468-a22e-b9a3fade3f61
With 1 framebuffer set, it seems like the display is rendering one line at a time, but I don't believe I have this option enabled. Code for how I am setting up the screen is here.
The display configuration is from lines 78 to 139, the touch configuration follows until line 198, and the slint and framebuffer configuration is after that. This is mostly taken from the lvgl_porting example provided on the waveshare site, near the bottom in the "Demo" link.
In that example, double buffering appears to be working, and held buttons stay held. The button holding issue also does not occur in slint on desktop, so I believe both of these issues to be related to how I am setting up the device, but I am not sure what to look for.
On line 122 I am setting the frame buffer to be placed in psram, and to use double buffering based on a definition. Both the datasheet and monitor output seem to indicate I have 8MB of psram available, which should be enough for 2 framebuffers at 800x480 and 2 bytes per pixel (1.536MB). I am not confident that how I am setting up the framebuffers with pointers to the vector data is correct or the best way of doing it.
Any help appreciated
Beta Was this translation helpful? Give feedback.
All reactions