Comments (15)
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.
from lv_port_linux.
Does the application crash, or does it just hang? Do you have the ability to debug using GDB?
from lv_port_linux.
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
lv_linux_frame_buffer_Uup115.tar.gz
from lv_port_linux.
Can you run evtest <your input device>
? What happens there when you put your finger on the touchpad? Do the events stop firing?
from lv_port_linux.
Within the virtual console (Ctrl + Alt + F1), I ran sudo evtest /dev/input/event5
. ALL touch pad events fire successfully. No issues.
from lv_port_linux.
Could you printf
the coordinates passed to LittlevGL libinput_read
?
from lv_port_linux.
@kisvegabor I think he is using evdev_read
, not libinput_read
.
from lv_port_linux.
I think he is using evdev_read, not libinput_read.
My bad, sorry. I meant evdev_read
.
from lv_port_linux.
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).
if(data->point.x >= lv_disp_get_hor_res(drv->disp))
data->point.x = lv_disp_get_hor_res(drv->disp) - 1;
if(data->point.y >= lv_disp_get_ver_res(drv->disp))
data->point.y = lv_disp_get_ver_res(drv->disp) - 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):
# define EVDEV_SCALE 0 /* Scale input, e.g. if touchscreen resolution does not match display resolution */
# if EVDEV_SCALE
# define EVDEV_SCALE_HOR_RES (4096) /* Horizontal resolution of touchscreen */
# define EVDEV_SCALE_VER_RES (4096) /* Vertical resolution of touchscreen */
# endif /*EVDEV_SCALE*/
# define EVDEV_CALIBRATE 0 /*Scale and offset the touchscreen coordinates by using maximum and minimum values for each axis*/
# if EVDEV_CALIBRATE
# define EVDEV_HOR_MIN 3800 /*If EVDEV_XXX_MIN > EVDEV_XXX_MAX the XXX axis is automatically inverted*/
# define EVDEV_HOR_MAX 200
# define EVDEV_VER_MIN 200
# define EVDEV_VER_MAX 3800
# endif /*EVDEV_SCALE*/
Is this the direction I should take, or should I do something else?
from lv_port_linux.
You should check raw the min max coordinates (e.g. printf
them) and use them in EVDEV_HOR/VER_MIN/MAX
.
from lv_port_linux.
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!
from lv_port_linux.
Glad to hear that it works!
from lv_port_linux.
Can you help me, I am also facing same issue.
from lv_port_linux.
Have you tried the tutorial? It's a challenge to get it working. What specifically are you having trouble with?
from lv_port_linux.
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).
from lv_port_linux.
Related Issues (20)
- Revision needed - Embedded GUI Using Linux Frame Buffer Device with LVGL HOT 22
- how do i run this repo HOT 7
- Compilation fails with Clang 15 HOT 1
- Alpha Blending in Wayland HOT 4
- Using 3rd-party lib qr-code shows "undefined reference"-error HOT 6
- Run on Raspberry pi zero but get two same contents in one frame HOT 1
- when I add the code in my linux systerm and cross compile , errors HOT 2
- sos HOT 1
- how can I run this project on my ubuntu computer? HOT 2
- Makefile HOT 1
- unable to open evdev interface:: No such file or directory HOT 3
- evdev_read callback denies non-zero ABS_MT_TRACKING_ID in touchscreen. HOT 3
- Error during make HOT 5
- exclude binaries from source code ! HOT 1
- How do use touch in v9? HOT 4
- Some bug-like issues HOT 11
- Documentation : cross compilation for arm HOT 41
- How to add nativeapp to Cmakelist? HOT 3
- How to implement a right-angled box through lv_obj HOT 1
- SDL2、Libdrm_LIBRARY HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lv_port_linux.