Helping in calibrating etp-4500ug for working in RPI3
-
Hi
I write a program with QT5.7 and cross compile to RPI3 . I use eglfs .
I'm using an eGalax touchscreen(etp-4500ug) , trying to get it to work with Raspberry Pi and Qt5. it sounds like it needs to work with tslib. Touch is working but it is mirrored.
I've been able to get tslib to work with this display using a tarball and two patches from:
http://repository.timesys.com/buildsources/t/tslib/tslib-1.0/
I have set the following environment variables:
TSLIB_CALIBFILE="/etc/pointercal"
TSLIB_CONFFILE="/etc/ts.conf"
TSLIB_CONSOLEDEVICE="/dev/tty"
TSLIB_FBDEVICE="/dev/fb0"
TSLIB_TSDEVICE="/dev/input/event0"When I run ts_calibrate I get the "Segmentation fault" error.
By regards
-
Hi and welcome to devnet,
As silly as it may sound, run ts_calibrate through a debugger to see what's going wrong.
-
Hi and Thanks you for reply
I connect to raspberry through ssh and run ts_calibrate and get the "Segmentation fault" message .
Recently I use below variable for TSLIBexport LD_LIBRARY_PATH=/usr/local/qt5pi/lib export PATH=/usr/local/qt5pi/bin:$PATH # hides mouse cursor export QT_QPA_EGLFS_HIDECURSOR=1 # enables tslib plugin for touch screen export QT_QPA_GENERIC_PLUGINS=Tslib # disables evdev mouse input (to avoid getting duplicated input from tslib AND evdev) export QT_QPA_EGLFS_DISABLE_INPUT=1 export TSLIB_FBDEVICE=/dev/fb0 export TSLIB_CONSOLEDEVICE=none export TSLIB_TSDEVICE=/dev/input/by-id/`ls /dev/input/by-id/ | grep "eGalax"` export TSLIB_CONFFILE=/etc/ts.conf export TSLIB_CALIBFILE=/etc/pointercal export TSLIB_PLUGINDIR=/usr/lib/arm-linux-gnueabihf/ts0
But with the same error "Segmentation fault" ...
Regards,
tictactoe -
Like I wrote before, run it through the debugger. You can install gdb on your Pi.
-
@tictactoe If you really do not want to use a debugger (this is actually something a programmer should learn) you can add qDebug() << "..." to your code at the places where you think the problem occurs. This can help to find out where the crash happens. But it isn't really easier than just using a debugger, which isn't rocket science.
-
finally I cant run ts_calibrate and save calibration point in the /etc/pointercal .
The below list is the last updated of environment variable for tslib and eglfsexport QT_QPA_PLATFORM=eglfs
export QT_QPA_EGLFS_TSLIB=1
export QT_QPA_FB_DISABLE_INPUT=1
export QT_QPA_EGLFS_TOUCHSCREEN_PARAMETERS=/dev/input/event0:invertx=1
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_CONSOLEDEVICE=/dev/tty
export TSLIB_TSDEVICE=/dev/input/by-id/ls /dev/input/by-id/ | grep "eGalax"
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_PLUGINDIR=/usr/local/lib/tsI dont know about the "QT_QPA_GENERIC_PLUGINS" variable.
I have a problem of inverting the X axis in my QT program that run on RPI3 yet
how can I solve this?Regards,
tictactoe -
Does look good yes
-
It's the same as any other program. Note that you can remote debug from Qt Creator. It's explained in the Launching the Debugger chapter of Qt Creator's documentation.