[SOLVED] QT EGLFS X axis is inverted with touchscreen 7inch(from olimex)

Started by Alex293, July 16, 2014, 06:58:48 PM

Previous topic - Next topic

Alex293

Everything is in title =)
I use QT 5.3.1 on A20 with 7inch ts from olimex.

My touch screen is ok with X, i can calibrate it with the sunxi-tool but it have no effect on qt apps.
Do someone know how to solve this ? Or how to calibrate my touch screen in qt ?

Alex293

Touchscreen is inverted because of evdev, i disactivated it with environment variables.
Now i need to build a tslib plugin for QT 5.3.1 but sources and options don't exist for 5.3.1 version =(
Do someone have any clue ? Any other method to use my ts with eglfs without x11 ?
I'm afraid that i need to create my own plugin/driver ..

Alex293

I've built tslib from souces and add -tslib option at qt compilation and now everything is ok

claudio

Hi, i have your same problem,
i have mounted the official debian image on my olinuxino micro, tslib works well, i can correctly run ts_calibrate, but when i deploy a qt app on my board the only way to make touchscreen work is adding the parameter "-plugin evdevtouch:/dev/input/event0". The problem is that the x-axes is inverted and i can't figure out how to solve this problem. Can you please explain me the steps you did?
Thank you in advance

Alex293

The problem comes from a conflict between evdev and tslib. In order to have a working ts you have to use env var like :
#export TSLIB_TSDEVICE /dev/input/event0
#export TSLIB_CALIBFILE  /etc/pointercal
#export TSLIB_CONFFILE /etc/ts.conf
#export TSLIB_PLUGINDIR /usr/lib/ts/plugins
#export TSLIB_CONSOLEDEVICE /dev/tty
#export TSLIB_FBDEVICE /dev/fb0

You can add these in your project/execution parameters editing batch file

claudio

Hi! Sorry for the late!! I solved some days ago this problem doing like you. Now i'm using Tslib. It was already installed on the official Debian image by Olimex, so the only thing i did is to add -tslib during the configuration part. One last thing was to disable EVDEV INPUT using the environment varibale. That's all! Thanks anyway for your answer!!

ghrvy

Here's another option:

xinput set-prop 1c25000.rtp 'Coordinate Transformation Matrix' -1 0 1 0 1 0 0 0 1