This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Touchscreen requires double touch to click QT buttons

I'm having a problem on a custom DM8148 board which appears to occur on the Mistral EVM as well. The touchscreen mouse emulation doesn't behave properly, requiring the cursor to be placed on a button with one touch before the button can be clicked with a second touch, and even that works only sporadically. I'm using an ST1232 based touchscreen/driver with the stock QT4.7.2 / libts1.1(??? I think, see last paragraph)

This behavior can be observed in this video starting at 1:20: https://www.youtube.com/watch?v=RMDRmqWcYOM&feature=player_detailpage#t=80

I've tried every possibility I can think of for the input reporting order in the driver, and the closest I've gotten to a solution is removing the BTN_TOUCH events and reporting a pressure of 1/0 instead, but that results in multiple mouse clicks begin registered for one touch release.

I also get an odd "mirroring" occurring. Basically, if you place the cursor at (100,100) then touch at (100,200), the cursor would instantly appear at (100,300) and stay there until the finger is moved, at which point proper operation would resume. Disabling the filters in ts.conf seems to fix this, but then the cursor instantly goes to (0,0) when the touch is released. Looking at tslib, it appears that sending a BTN_TOUCH of 0 instantly moves the cursor to the top left, and the filters that are on by default are masking this and possibly causing the mirroring effect.

I also observed an inconsistency with the libts version included on the root filesystem, and am wondering if that has anything to do with it. Error messages that are present only in libts1.1 or higher are presented, while the file naming libts-1.0.so.0 indicates a version 1.0 version. Specifically, error messages such as "tslib: Selected device is not a touchscreen (must support ABS and KEY event types)" are presented while the 1.0 source code does not contain these. Is there some reason the 1.1 binaries were included but named as 1.0 binaries? The TI guide says to use 1.0 while compiling QT. These messages are contained in https://github.com/kergoth/tslib/blob/master/plugins/input-raw.c

  • David,

    Are you using EZSDK 5.05.02.00?

    BR
    Pavel

  • Yes, I'm on 5.05.02.00.

  • David,

    David Kronstein said:
    The touchscreen mouse emulation doesn't behave properly, requiring the cursor to be placed on a button with one touch before the button can be clicked with a second touch

    I tried this on my side (EZSDK 5.05.02.00 with DM8148 EVM), and I observe that when I make one slight and fast touch, I can reproduce that issue, but when I make one sturdy and continuous touch, it works.

    One possible solution that I can suggest you is to transition to newer Graphics SDK to see if there will be any improvements. The EZSDK 5.05.02.00 comes with:

    ti-ezsdk_dm814x-evm_5_05_02_00/component-sources/graphics-sdk_4.04.00.02

    You can try first switch from graphics-sdk_4.04.00.02 to graphics-sdk_4.10.00.01 (the newest one), but note that this newest graphics SDK is only build tested with DM814x device. If it doesn't work, try switch from graphics-sdk_4.04.00.02 to graphics-sdk_4.06.00.03 which is last release tested on DM814x. See the below post:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/p/316859/1108910.aspx#1108910

    The Graphics SDK is available at:

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html - 4.10.00.01

    http://downloads.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/4_06_00_03/index_FDS.html - 4.06.00.03

    Regards,
    Pavel

  • David,

    See also if the below wiki pages will be in help:

    http://processors.wiki.ti.com/index.php/DM81xx_AM38xx_PSP_TouchScreen_Driver_Guide

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_FAQ#Testing_Touchscreen_Library

    http://processors.wiki.ti.com/index.php/AM335x_Touchscreen_Driver%27s_Guide

    http://processors.wiki.ti.com/index.php/How_to_use_a_Mouse_instead_of_the_Touchscreen_with_Matrix

    http://processors.wiki.ti.com/index.php/Building_Qt

    http://processors.wiki.ti.com/index.php/Matrix_Users_Guide

    http://processors.wiki.ti.com/index.php/How_to_Recalibrate_the_Touchscreen

    http://processors.wiki.ti.com/index.php/Tslib

    http://processors.wiki.ti.com/index.php/Building_Qt_with_OpenGL_ES_accelerated_by_SGX

    BR
    Pavel

  • Found the problem, it was having both touchscreen and mouse enabled in matrix-gui-e. On the line:

    export QWS_MOUSE_PROTO="Tslib:/dev/input/event0 Auto:/dev/input/mice"

    removing "Auto:/dev/input/mice" solves the double click problem, but of course then you can't use the mouse. Seems to be a bug in QT.

    In tslib, it turns out the pthres module corrects for the movement of the cursor to (0,0) on touch release.

    I ultimately discovered the fix of disabling the mouse while attempting to rebuild QT with some TSLIB debug messages enabled. For some reason the mouse wouldn't work at all in my rebuilt libQtGuiE.

    It seems some dependencies included with the recommended QT source don't match what's included on the root filesystem, libpng at least, probably others, so my rebuilt libQtGuiE wouldn't load pictures. Is there anywhere I can get a list of the versions of everything required to build QT, since they don't seem to be what's in the recommended package?