-
Notifications
You must be signed in to change notification settings - Fork 156
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
Touch pad is unresponsive #3
Comments
Does the application crash, or does it just hang? Do you have the ability to debug using GDB? |
The application doesn't crash or hang. The text box cursor keeps blinking and the spinner (bottom left) keeps spinning. As soon as I put my finger on the touch pad, the touch pad cursor simply disappears and the touch pad buttons no longer work. GDB also shows no evidence of hanging. I've attached the project for your reference. I must run as sudo ./demo. Otherwise, permission is denied for "evdev" interface. Best Regards |
Can you run |
Yes, from the X window console command prompt, I ran evtest many times yesterday. No issues. Touch events fire successfully. However, now that you mention it... Perhaps, I should run evtest within the virtual console (Ctrl + Alt + F1). This is where ./demo actually runs. I'll try this, later this evening, and report back. |
Within the virtual console (Ctrl + Alt + F1), I ran |
Could you |
@kisvegabor I think he is using |
My bad, sorry. I meant |
Thanks to both of you for the insight! It seems the touch pad's coordinates don't begin at zero for X & Y (something that never crossed my mind). Lines 208 - 211 of evdev.c are forcing the x & y data points outside (below) the touch pad's active coordinate range (x: 799, y: 479; which equals the frame's dimensions - 1).
In this case, scaling is needed. I expect calibration will also be needed, to keep the touch pad's cursor from moving outside of the frame. Scaling and Calibration can be adjusted within lv_drv_conf.h (lines 282 - 294):
Is this the direction I should take, or should I do something else? |
You should check raw the min max coordinates (e.g. |
I now have the touch pad working! However, as the code is written, it's functioning similar to a touch screen, rather than a mouse. Not a problem though. I plan to use a touch screen anyway. Thanks again, to the both of you, for the excellent support and learning experience! |
Glad to hear that it works! |
Can you help me, I am also facing same issue. |
Have you tried the tutorial? It's a challenge to get it working. What specifically are you having trouble with? |
I developed UI which is responsive in Display monitor using mouse, Same UI, I wanted to use with touch panel. But it is not responsive (touch is not working). I am using 1024x600 TFT LCD Display with capacitive touch panel. (Touch Screen Controller FT5406). |
Hello,
Thanks for the frame buffer example. These types of examples are a huge help.
I'm trying to get the mouse (touch pad) working... The following code gives me a light gray cursor (LV_SYMBOL_UP) in the upper left corner of the frame, as shown in the attached photo.
`// get an input device like mouse
lv_indev_drv_t indev_drv;
lv_indev_drv_init(&indev_drv);
indev_drv.type = LV_INDEV_TYPE_POINTER;
indev_drv.read_cb = evdev_read;
lv_indev_t * mouse_indev = lv_indev_drv_register(&indev_drv);
lv_obj_t * cursor_obj = lv_img_create(lv_scr_act(), NULL); //Create an image for the cursor
lv_img_set_src(cursor_obj, LV_SYMBOL_UP); //Add a built in symbol not an image
lv_indev_set_cursor(mouse_indev, cursor_obj); //Connect mouse object to the driver
`
When the LEFT touch pad button is pressed, Tab 1 is highlighted (buttons seem to be working). However, when I put my finger on the touch pad, the cursor disappears and buttons stop working.
Not sure why this is happening. Does anyone know?
Best Regards
The text was updated successfully, but these errors were encountered: