[Solved] 0.3.4 RPi2 Issues using tslib calibrated touchscreen

qDslrDashbord error reports
Post Reply
Bertsz
Posts: 9
Joined: 16 Jan 2016, 20:03

[Solved] 0.3.4 RPi2 Issues using tslib calibrated touchscreen

Post by Bertsz »

So here I am again after getting the software to run on raspbian (RPi2).
My current problem is a eGalax touchscreen which by default is inverted on the x-axis. While it isn't too difficult to calibrate the touchscreen when x11 is running, these changes will not affect how the screen works in qDslrdashboard. Meaning that no matter what I do, the input is still inverted there, while it isn't on the desktop environment.
After I found out that I could also calibrate the screen using tslib, I followed this guide to compile the library and got the changes to also affect the command line interface (the ts_test application which draws directly to the frame-buffer, which means I don't need X) using ts_calibrate.
To load the the correct environment variables I added the commands below to the qDslrdashboard.sh

Code: Select all

export QT_QPA_EGLFS_PHYSICAL_HEIGHT=86
export QT_QPA_EGLFS_PHYSICAL_WIDTH=154
export TSLIB_TSEVENTTYPE=INPUT
export TSLIB_TSDEVICE=/dev/input/event2
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/lib/arm-linux-gnueabihf/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE='/dev/fb0'
#export QT_QPA_EGLFS_DISABLE_INPUT=1 //This just disabled all inputs
export QT_QPA_GENERIC_PLUGINS=tslib:/dev/input/event2
export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event2

#If i were to run ts_test at this point everything would be working just fine
#Also I'm skipping a few lines here

exec $dirname/$appname -plugins tslib:/dev/input/event2 -platform "${PLATFORM}" &!>/dev/nul 2>&1 &
The "-plugins tslib:/dev/input/event2" part of the last line just throws me an "No such plugin for spec" error, so that doesn't seem to be important

This is everything I've tried so far, but even the tslib configuration doesn't seem to change how it acts in qDslrdashboard, so I'm stuck here.

Thanks in advance!
Last edited by Bertsz on 19 Mar 2016, 23:35, edited 1 time in total.
Bertsz
Posts: 9
Joined: 16 Jan 2016, 20:03

Re: 0.3.4 RPi2 Issues using tslib calibrated touchscreen

Post by Bertsz »

And here I am again besically replying to my own thread just in case someone has the same issue.
I don't know if this applies to all kinds of qt5 applications compiled with tslib, but how I fixed my problem was fairly simple.
Digging through the documentation, I found out that there's a environment variable to enable tslib. So all I had to do was add

Code: Select all

QT_QPA_EGLFS_TSLIB=1
to the other exports and remove the "-plugins tslib:/dev/input/event2" parameter, since it doesn't do anything.

Now the qDslrDashboard is using the transformation-info generated by ts_calibrate, and everything seems to be working fine. It still shows the cursor as long as a mouse is plugged in, but I think there's a env-variable to fix that too.
Post Reply