Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: Alex293 on July 16, 2014, 06:58:48 PM

Title: [SOLVED] QT EGLFS X axis is inverted with touchscreen 7inch(from olimex)
Post by: Alex293 on July 16, 2014, 06:58:48 PM
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 ?
Title: Re: QT EGLFS X axis is inverted with touchscreen 7inch(from olimex)
Post by: Alex293 on July 17, 2014, 05:22:53 PM
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 ..
Title: Re: QT EGLFS X axis is inverted with touchscreen 7inch(from olimex)
Post by: Alex293 on July 24, 2014, 11:27:41 AM
I've built tslib from souces and add -tslib option at qt compilation and now everything is ok
Title: Re: [SOLVED] QT EGLFS X axis is inverted with touchscreen 7inch(from olimex)
Post by: claudio on November 04, 2014, 06:07:26 PM
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
Title: Re: [SOLVED] QT EGLFS X axis is inverted with touchscreen 7inch(from olimex)
Post by: Alex293 on November 11, 2014, 04:56:45 PM
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
Title: Re: [SOLVED] QT EGLFS X axis is inverted with touchscreen 7inch(from olimex)
Post by: claudio on November 20, 2014, 05:02:43 PM
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!!
Title: Re: [SOLVED] QT EGLFS X axis is inverted with touchscreen 7inch(from olimex)
Post by: ghrvy on February 12, 2016, 10:33:47 PM
Here's another option:

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