0

I created a Qt Application with Qt Creator 3.3.1, using Qt embedded 4.8.6 for a Cortex A5. It runs on a board with Linux embedded and a touchscreen. The filesystem was created with Buildroot 2015.08. I'm using a resistive touchscreen calibrated with ts_calibrate. The Qt Application works, but I often get the wrong coordinates. For example, when I push on a button, sometimes the program takes the coordinates related to another point of the touchscreen, giving the idea that the button pushed doesn't work properly.

My Qt enviroment variable are:

  export TSLIB_CALIBFILE='/etc/pointercal'
  export TSLIB_CONFFILE='/etc/ts.conf'
  export TSLIB_PLUGINDIR='/usr/lib/ts'
  export TSLIB_TSDEVICE=`cat /etc/ts.dev 2>/dev/null`
  export QWS_DISPLAY=LinuxFB:mmWidth=800:mmHeight=480
  export QWS_MOUSE_PROTO=Tslib:/dev/input/event0

If I try to use another Qt Application (for example the Qt demos created with Buildroot) I get the same problem. Is it a bug of Qt 4.8.6 or something? Can anyone help me? Thank you

Memphis
  • 41
  • 1
  • 1
  • 6
  • 2
    Try using the utilities provided with tslib: `ts_test`, `ts_print` and `ts_print_raw`. If they have the same problem, it's not related with Qt. – Luca Ceresoli Sep 27 '16 at 11:42
  • I agree with Luca that this is most likely an issue with the touch screen itself - either in the driver, or (more likely) bad decoupling at the edges of the screen. The whole input stack (Linux driver, tslib, Qt) does nothing more than a linear transformation of the coordinates given by the touch screen controller. IOW, if you touch the same screen area two times and it gives two different coordinates, it's a hardware issue. – Arnout Sep 27 '16 at 22:09

1 Answers1

0

Sounds like playing with your activated filters or their parameters in ts.conf might help.

Since you asked your question, there is tslib 1.2 and (if you need multitouch) tslib 1.3-rc3, both with new and improved filters, see tslib's project page

merge
  • 36
  • 3
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/14658483) – Bhavesh Odedra Dec 21 '16 at 08:48
  • @Odedra this seems like more then a link only answer. – Petter Friberg Dec 21 '16 at 08:59