Double input from touchscreen.
-
Hello all,
I am having a problem with set up of the environment around my Qt app on Beaglebone Black. Embedded Linux system got created with Yocto project. Touchscreen seems to be working as I can calibrate it with ts_calibrate and later on successfully test it with ts_test.
My Qt application is just a simple GUI with 2 buttons and it does show up successfully and normal mouse is working as it should. Problem appears whenever I try using touchscreen. I do experience a cursor movement as if it was sourced from two places at the same time - one source perfectly calibrated working exactly as it should, the second completely uncalibrated as if it was a raw a reading. Both sources meet perfectly in the upper left corner of the screen.
Application "buttons" is started from a simple script where I try to initialize environment variables before execution. I am trying to use linuxfb platform with tslib. I do not have eglfs platform installed in my Qt environment.
#!/bin/bash export QT_QPA_EGLFS_DISABLE_INPUT=1 export QT_QPA_FB_DISABLE_INPUT=0 export QT_QPA_EGLFS_TSLIB=1 export QT_QPA_FB_TSLIB=1 export QT_QPA_GENERIC_PLUGINS=tslib:/dev/input/event0 export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0 export QT_PLUGIN_PATH=/usr/lib/qt/plugins export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS="" export QT_QPA_EVDEV_KEYBOARD_PARAMETERS="" #export QT_QPA_EVDEV_MOUSE_PARAMETERS="" export TSLIB_TSEVENTTYPE='INPUT' export TSLIB_CALIBFILE='/etc/pointercal' export TSLIB_CONFFILE='/etc/ts.conf' export TSLIB_CONSOLEDEVICE='none' export TSLIB_FBDEVICE='/dev/fb0' export TSLIB_PLUGINDIR='/usr/lib/ts' export TSLIB_TSDEVICE='/dev/input/event0' /home/root/buttons source -platform linuxfb -plugin tslib #/home/root/buttons source exit 0
My input devices show up as follow, where event0/mouse0 is the touch device over USB:
root@bbb:~# ls -all /dev/input/by-id total 0 drwxr-xr-x 2 root root 180 Sep 12 02:43 . drwxr-xr-x 4 root root 260 Sep 12 02:43 .. lrwxrwxrwx 1 root root 9 Sep 12 01:35 usb-Logitech_USB_Keyboard-event-if01 -> ../event2 lrwxrwxrwx 1 root root 9 Sep 12 01:35 usb-Logitech_USB_Keyboard-event-kbd -> ../event1 lrwxrwxrwx 1 root root 9 Sep 12 02:43 usb-MOSART_Semi._2.4G_Keyboard_Mouse-event-kbd -> ../event3 lrwxrwxrwx 1 root root 9 Sep 12 02:43 usb-MOSART_Semi._2.4G_Keyboard_Mouse-if01-event-mouse -> ../event4 lrwxrwxrwx 1 root root 9 Sep 12 02:43 usb-MOSART_Semi._2.4G_Keyboard_Mouse-if01-mouse -> ../mouse1 lrwxrwxrwx 1 root root 9 Sep 12 01:35 usb-WWW.PowerMCU.COM_Multi_Media_Development_Board_V1.0_6D8413964957e-event-mouse -> ../event0 lrwxrwxrwx 1 root root 9 Sep 12 01:35 usb-WWW.PowerMCU.COM_Multi_Media_Development_Board_V1.0_6D8413964957e-mouse -> ../mouse0
How to disable this erratic cursor source? How to diagnose the problem?
I am very new to the embedded Linux development, so any guidance on would be really appreciated.