Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [solved] Touchscreen calibration issue on Qt 4.8.4 on ARM
QtWS25 Last Chance

[solved] Touchscreen calibration issue on Qt 4.8.4 on ARM

Scheduled Pinned Locked Moved Mobile and Embedded
9 Posts 3 Posters 11.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    marcin100
    wrote on last edited by
    #1

    I'm having hard time calibrating the touchscreen when running Qt on the i.mx6 board (SabreLite)

    the tslib calibration works ok and I can see the cursor following my finger.

    However when I run any Qt app (either mine or one of the Qt demos included with Qt) the cursor seems to be moving at different pace than the finger. Seems like cursor is moving across a much larger space than the screen and it goes off the screen when the finger is still about 30% away from the edge.

    Why the Qt does not use tslib calibration data?
    Is there a way to define the touchscreen size which I maybe missed?

    I have come across posts where other people had similar issue but no solutions.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Are you sure you are using the tslib input when starting your application ?
      Did you configure all tslib related environment variables ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        marcin100
        wrote on last edited by
        #3

        It is entirely possible that I have missed something since I'm a beginner in this area. To be honest, I am not sure how to specify tsllib intput when starting my Qt application.
        I would appreciate a short code example, if possible.

        FYI: I am using QtQuick(qml) for my gui, but this should not matter.. I think.

        I did configure the tslib env vars:
        export LD_LIBRARY_PATH=/usr/lib
        export TSLIB_TSEVENTTYPE=INPUT
        export TSLIB_CONSOLEDEVICE=none
        export TSLIB_FBDEVICE=/dev/fb0
        export TSLIB_CALIBFILE=/etc/pointercal
        export TSLIB_CONFFILE=/etc/ts.conf
        export TSLIB_PLUGINDIR=/usr/lib/ts
        export TSLIB_TSDEVICE=/dev/input/event1

        and the:
        TSLIB_CONFFILE contents:

        module_raw input
        module pthres pmin=1
        module variance delta=30
        module dejitter delta=100
        module linear

        1 Reply Last reply
        0
        • M Offline
          M Offline
          marcin100
          wrote on last edited by
          #4

          UPDATE:
          problem solved by updating env variables as shown below:

          export LD_LIBRARY_PATH=/usr/lib
          export TSLIB_TSEVENTTYPE=INPUT
          export QTDIR=/home/martin/Qt_E/qt-4.8.4_tslib/
          export QWS_MOUSE_PROTO=tslib:/dev/input/event1
          export TSLIB_CONSOLEDEVICE=none
          export TSLIB_FBDEVICE=/dev/fb0
          export TSLIB_CALIBFILE=/etc/pointercal
          export TSLIB_CONFFILE=/etc/ts.conf
          export TSLIB_PLUGINDIR=/usr/lib/ts
          export TSLIB_TSDEVICE=/dev/input/event1
          export QWS_DISPLAY=LinuxFB:mmWidth=800:mmHeight=480

          I have not nailed down which exact line fixed it but I have a feeling the QWS_DISPLAY is the one.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Great you found out !
            Since it's the only line that was missing, my guess is that Qt was maybe using a different plugin (I don't remember which is the default), couldn't find the correct screen size or was given a wrong size (but I might be wrong).

            Don't forget to set the thread's title to solved so other forum users may know a solution has been found :)

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • G Offline
              G Offline
              giri babu
              wrote on last edited by
              #6

              hi have the same problem where do i find the tslib env vars file to edit,sorry i am new to this kindly help me if i am wrong.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Hi and welcome to devnet,

                For testing purpose, you can simply set the variables on the command line before calling your application

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  giri babu
                  wrote on last edited by
                  #8

                  hi,

                  i have one more problem now i am using qt4e-demo-image and i get smart home demo on the target and says xres=800 and yres=460 after this i am not able to calibrate the touch screen its a touch screen from freescale scale its mciimx lvds connected to lvds 1 of sbaresd board the display says TOUCH CROSSHAIR TO CALIBRATE but if i touch it does not detect anything it does not work, kindly let me know what changes i have to make and where..

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    That I can't, I don't have such a setup at hand. You should have a look at the documentation of your board/provider.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved