-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sluggish Touch events proportionate to the amount of screen draw going on. (BSP-627) #492
Comments
Hello @wreyford, you can try to remove interrupt pin from touch and then it will be handled together with other events - usually after timeout ( In your proposal, you mean put this function to |
No sorry for not being clear.
Thus touch and other events managed separately? As the lvgl_queue queue is 100 deep, if touch is last event and queue near full, it has to wait for all other events to be processed before it is processed. |
Oh, I understand. It seems that there will be better to use |
It looks as though all events are passed to:
So we can branch here, and then add to touch_queue and events_queue respectively. Or else you can try optimizing the current lvgl port_task to prioritize touch events over other events.
|
Did you try your solution? Did it fix your issue? |
Thx, I tried your implementation, but now I have no touch at all.
|
Ok so turns out it was part my fault.
Changes: and:
The remainder stays the same. And Now I can congratulate you. |
@wreyford I am sorry, I made a mistake in my code, now it should work. We will make review on it and release. |
@espzav Thank you so much. Event Group was a fantastic idea, less overhead, and immediate response. Fantastic. |
Board
ESP32S3 F16 R8
Hardware Description
Custom PCB
LCD ILI9488 over Intel 8080 bus. (480x320)
TOUCH FT5X06
IDE Name
VSCode Insiders
Operating System
Windows 10
Description
Before migrating our code to use the esp_lvgl_port component touch was responsive. I directly linked to interrupt on CPT touch, and managed touch events as they occurred.
In lvgl_port component both the touch-events and lvgl-events are added to the 100 deep lvgl_queue. (lvgl_port_task private function).
This design of both touch and other events in the same queue appears to be the reason for delayed touch or missed touch events when there are many LVLG events on the queue.
My question to the developers - can we split the touch and other events and manage separately?
Sketch
Other Steps to Reproduce
Other tweaks I have made:
I increased the LVLG Task priority from 4 to 6.
I have reduced the task_max_sleep_ms to 1
I have tried to only update digits (areas) that actually change on the screen, thus reducing events, but overcomplicating our code.
This has resulted in a minor improvement, but the device was nice and responsive to touch before I upgraded, vs the way it is now.
The esp_lvgl_port is well written, allows for ease of use in adding devices LCD, touch etc, and integrates perfectly with RTOS, thus we decided to move.
I do not see us going back to our old implementation, as porting opur code took more than a month.
I hope you can help with a solution.
I have checked existing issues, README.md and ESP32 Forum
The text was updated successfully, but these errors were encountered: