Results 1 to 2 of 2

Thread: Touch position is wrong after start.

  1. #1
    Join Date
    Mar 2012
    Posts
    30
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Touch position is wrong after start.

    Hi,

    I'm using Qt 4.8.1 cross compiled with armVFP (http://en.wikipedia.org/wiki/ARM_architecture). I'm using the tslib and the touch screen is responding. My env variables are:
    export QWS_MOUSE_PROTO=tslib
    export TSLIB_CONSOLEDEVICE=none
    export TSLIB_FBDEVICE=/dev/fb0
    export TSLIB_TSDEVICE=/dev/input/event1
    export TSLIB_CALIBFILE=/usr/local/etc/pointercal
    export TSLIB_CONFFILE=/usr/local/etc/ts.conf
    export TSLIB_PLUGINDIR=/lib/ts
    export QWS_DISPLAY=Transformed
    export QTDIR=/usr/local/Trolltech/QtEmbedded-4.8.1-arm
    export LD_LIBRARY_PATH=/usr/local/Trolltech/QtEmbedded-4.8.1-arm/lib


    I wrote a simple Qt application (of course cross-compiled) which I added it into the inittab file to start the application.

    When I start the embedded linux system the Qt app start, but the cursor is not synchron to the touch position. My work around is, that I kill the Qt app and recalibrate it with ts_calibrate. After this the /usr/local/etc/pointercal file is updated. Then I start the Qt app again and the cursor and touch position is correct.

    But the next start of the system the position is wrong again.

    Does anybody know what's going wrong?

    Regards,

    lamb

  2. #2
    Join Date
    Mar 2012
    Posts
    30
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Touch position is wrong after start.

    Hi,

    I could solve my problem. I started the Qt application in the inittab in this way:
    Qt Code:
    1. ::once:/usr/local/root/MyQtApp -qws
    To copy to clipboard, switch view to plain text mode 

    But the environment variables weren't available. My solution is to write a shell script and call it from inittab:
    Qt Code:
    1. ::once:/usr/local/root/MyQtApp.sh
    To copy to clipboard, switch view to plain text mode 

    Content of /usr/local/root/MyQtApp.sh
    Qt Code:
    1. if [ -f /etc/profile ] ; then
    2. . /etc/profile
    3. #Note that the call of /etc/profile is using a dot (.)
    4. #The dot notation runs the script in the same shell ..i.e calling shell ..
    5. #If you call it without using a dot ...then also the script will run ... but in a new shell ..( sub-shell) and the environment variables are not available.
    6. /bin/echo "/etc/profile found and called."
    7. else
    8. /bin/echo "Can't find /etc/profile. Maybe the application can't run or the behaviour is wrong."
    9. fi
    10. exec /usr/local/root/MyQtApp -qws
    To copy to clipboard, switch view to plain text mode 

    I'm not able to call /etc/profile from inittab. If someone knows a solution please write a message.

    - The happy lamb

Similar Threads

  1. Tooltip Displaying on the wrong position
    By nekkro-kvlt in forum Qt Programming
    Replies: 4
    Last Post: 20th February 2012, 10:29
  2. Replies: 0
    Last Post: 5th October 2010, 15:19
  3. Replies: 4
    Last Post: 3rd May 2010, 12:41
  4. Replies: 7
    Last Post: 17th July 2009, 10:40
  5. mouseMoveEvent contains wrong position?
    By draftpunk in forum Qt Programming
    Replies: 10
    Last Post: 12th September 2008, 02:59

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.