I have an embedded linux system with a resistive touchscreen on /dev/input/event0 and a tslib installed. The tslib's tools such ts_calibrate and ts_tools are working perfectly with the modules/filters described in my /etc/ts.conf file.
The problem is that my QT application is not loading the library in the correct mode. It is loading tslib in raw mode, as the debug information shows.
I checked tslib's code, QT documentation and other similar questions on internet in search of any configuration that I'm missing, but apparently it's all OK.
This is my /etc/ts.conf file:
module_raw input
module pthres pmin=3975
module debounce drop_threshold=30
module variance delta=30
module dejitter delta=100
module median depth=3
module linear
This are my environment variables:
root@HMI:/application# env
SHELL=/bin/sh
RUNLEVEL=3
QWS_DISPLAY=LinuxFB:mmWidth=154.21:mmHeight=85.92
EDITOR=vi
PWD=/application
LOGNAME=root
TSLIB_CONSOLEDEVICE=none
HOME=/home/root
SSH_CONNECTION=192.168.1.30 42280 192.168.1.20 22
QT_QPA_PLATFORM=linuxfb
TSLIB_CALIBFILE=/etc/pointercal
QT_QPA_FB_TSLIB=1
TERM=xterm-256color
USER=root
SHLVL=1
TSLIB_PLUGINDIR=/usr/lib/ts
QT_DEBUG_PLUGINS=1
LD_LIBRARY_PATH=/usr/lib
XDG_RUNTIME_DIR=/var/volatile/tmp/runtime-root
PS1=\u@\h:\w\$
SSH_CLIENT=192.168.1.30 42280 22
TSLIB_TSEVENTTYPE=INPUT
TSLIB_TSDEVICE=/dev/input/event0
TSLIB_CONFFILE=/etc/ts.conf
TSLIB_FBDEVICE=/dev/fb0
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/plugins/platforms
SSH_TTY=/dev/pts/0
QT_PLUGIN_PATH=/usr/lib/plugins
QT_QPA_GENERIC_PLUGINS=tslib:/dev/input/event0
OLDPWD=/home/root
_=/usr/bin/env
And this is part of the debug output of my QT application starting it whith '''-plugin tslib''' (whole output available here):
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/generic/libqtslibplugin.so"
Found metadata in lib /usr/lib/plugins/generic/libqtslibplugin.so, metadata=
{
"IID": "org.qt-project.Qt.QGenericPluginFactoryInterface",
"MetaData": {
"Keys": [
"Tslib",
"TslibRaw"
]
},
"archreq": 0,
"className": "QTsLibPlugin",
"debug": false,
"version": 331264
}
Got keys from plugin meta data ("tslib", "tslibraw")
As you can see in "Keys" when loading the library, it says "TslibRaw". I think this is the mode in which it is loading tslib and the reason why the filters/modules described in /etc/ts.conf are not being applied.
Does someone knows how to get my QT application working whith tslib and it's modules?