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. tslib yocto touch event is not working
Forum Updated to NodeBB v4.3 + New Features

tslib yocto touch event is not working

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
10 Posts 2 Posters 5.4k Views 1 Watching
  • 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.
  • mkrrM Offline
    mkrrM Offline
    mkrr
    wrote on last edited by
    #1

    I'm trying to execute tslib in my yocto. The problem is that my touch screen is not recognized by the tslib (with ts_calibrate or ts_test).

    If I use the evtest, it works perfectly, take a look:

    ps: My device was recognized in "/dev/input/event0"

    ~# evtest
    No device specified, trying to scan all of /dev/input/event*
    Available devices:
    /dev/input/event0: cyttsp5_mt
    /dev/input/event1: Logitech USB Receiver
    /dev/input/event2: Logitech USB Receiver

    I'm selecting the "zero" device:
    ...
    Min 0
    Max 1
    Event code 57 (ABS_MT_TRACKING_ID)
    Value 0
    Min 0
    Max 65535
    Event code 58 (ABS_MT_PRESSURE)
    Value 0
    Min 0
    Max 255
    Properties:
    Property type 1 (INPUT_PROP_DIRECT)
    Property type 1 (INPUT_PROP_DIRECT)
    Testing ... (interrupt to exit)
    Event: time 1472308931.862872, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 2
    Event: time 1472308931.862872, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 92
    Event: time 1472308931.862872, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 267
    Event: time 1472308931.862872, type 3 (EV_ABS), code 58 (ABS_MT_PRESSURE), value 30
    Event: time 1472308931.862872, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 12
    Event: time 1472308931.862872, type 3 (EV_ABS), code 49 (ABS_MT_TOUCH_MINOR), value 12
    Event: time 1472308931.862872, -------------- SYN_REPORT ------------
    Event: time 1472308931.881448, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 93
    ...

    I tried set the enviromental variables:
    export TSLIB_TSEVENTTYPE=INPUT
    export TSLIB_TSDEVICE=/dev/input/event0
    export TSLIB_CALIBFILE=/etc/pointercal
    export TSLIB_CONFFILE=/etc/ts.conf
    export TSLIB_PLUGINDIR=/usr/lib/ts
    export TSLIB_FBDEVICE=/dev/fb0
    export TSLIB_CONSOLEDEVICE=none

    I'm using QT5 to develop, and I'm starting the applications in this way.
    export QWS_MOUSE_PROTO=tslib:/dev/input/event0
    ./app -platform eglfs "QWS_MOUSE_PROTO=tslib:/dev/input/event0"

    My ts.conf file is:
    /etc/ts.conf
    module_raw input
    module pthres pmin=1
    module variance delta=30
    module dejitter delta=100
    module linear

    I haven't any idea about the reason that it's not working.

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

      Hi,

      You're mixing Qt 4 old architecture (QWS) and Qt 5. See here for input handling for Embedded Linux.

      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
      • mkrrM Offline
        mkrrM Offline
        mkrr
        wrote on last edited by
        #3

        @SGaist thank you. I did work the touchscreen on my Qt5 application, using this environment variable:

        export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event0

        If I start the application: ./app -platform eglfs, the touch events are working now.

        But the touch screen axes (X and Y) are inverted. I uninstalled the tslib and libinput package.
        Some idea?

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

          You can try to add the rotate parameter to the plugin parameters. See on the same page of documentation I linked before

          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
          • mkrrM Offline
            mkrrM Offline
            mkrr
            wrote on last edited by
            #5

            Yes, the rotation can work. I tried this:

            export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event0:rotate=270

            But, what is happening, is that the axes are inverted. Should be a way to calibrate the touchscreen (like ts_calibrate) to set correctly the axes. Appear that rotating will not to solve.

            In my view, something like this, should be sufficient to tslib works.
            export QT_QPA_EGLFS_DISABLE_INPUT=1
            export TSLIB_TSDEVICE=/dev/input/event0
            export QT_QPA_PLATFORM=eglfs

            ./app -plugin tslib

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

              If you want to use tslib you have to calibrate it and set all the environment variables related to it.

              By the way, what about 90° ?

              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
              • mkrrM Offline
                mkrrM Offline
                mkrr
                wrote on last edited by
                #7

                If I rotate 90º, is not sufficient. Look the image attached.

                0_1473721789394_click.png

                The click on right top is correct. But, for example, if I click on position of the blue ball, the touch will recognize on position of the red ball.

                It will be the same if I click on red ball (the touch will recognize the event on position of the blue ball)

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

                  The direct upload function is currently broken so nobody but you can see the image. Can you post it on an image sharing site ?

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

                  mkrrM 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    The direct upload function is currently broken so nobody but you can see the image. Can you post it on an image sharing site ?

                    mkrrM Offline
                    mkrrM Offline
                    mkrr
                    wrote on last edited by
                    #9

                    @SGaist link: https://www.dropbox.com/s/2qm6j1zd8f5kja7/click.png?dl=0

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

                      After re-reading something's not clear. Did you re-try with tslib ?

                      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