touch screen X Y axis inverted ?!?

Hi everybody,

working on a flash application interface, loaded by gnash-fb, on a LCD
panel of 800x480 in framebuffer mode, I have something strane with the
touchscreen :

after calibrating the TSLib with ts_calibrate, I have something good
with ts_test :

Hello,

nobody has idea about this tricky issue ?

I am still searching for the problem, but get stuck...

Please help,

Georges

Hi Georges,

Have you tried flipping the touchscreen connection over?

A lot of touch screen connectors can take the flexible cable in both
orientations - It may put a twist in the cable, but may fix the X/Y
switching issue.

Regards,

PJE

Hi PJE,

thanks for your help.

To answer your proposal, the flat cable as contact only on one side,
so impossible to invert it.

And the point is that the TS work great under TSLIB (with ts_test for
exemple)...

I think it is a bug of gnash on certain calibrations of the TS.

So I decided to add the TSLIB patch to Gnash that Nico Coesel did for
gnash-0.8.2 : http://savannah.gnu.org/patch/?6490

So I managed to modify the 2 patch files so they fit with gnash-0.8.5
source as I compile gnash-fb in OE.

Then I modified recipes/gnash/gnash-fb_0.8.5.bb to add tslib in the
dependencies.

During the compile of gnash-fb (bitbake):
- the depency to tslib compile tslib_1.0.bb as wanted
- the do_patch works great
- the do_compile fail after the compilation of fb.cpp when the linker
don't find functions such as ts_close() (specific functions of
tslib) : "undefined reference of ts_close()"

When looking at the linker command line in the log (tmp/work/armv7a-
angstrom-linux-gnueabi/gnash-fb-0.8.5-r6/temp/log.do_compile.2625)
link all needed libraries like tmp/staging/armv7a-angstrom-linux-
gnueabi/usr/lib/libXau.so and many other but not libts.so !!!

I tried many many times to add it, but cannot find the solution.

Does somebody know how to force the link of this library ?

It seems adding "tslib" to the DEPEND += "lib1 lib2" of the .bb file
is not enough, but I cannot find where to fix this issue.

Thanks for any help on this bitbake tricks.

Georges

Hi,

Hi Kees,

you are right, Gnash calibration is just different as TSLIB
calibration :
Gnash use 2 points
and
TSLIB use 5 points

The problem is that using 2 points is not enough :
http://www.embedded.com/story/OEG20020529S0046
3 points is a minimum...

I didn't managed to add TSLIB to gnash (linker problem see below), so
I modified the built in TS calibration in Gnash to use the 3 points
methode decribed above.

Here is the patch if somebody else need it (work fine for me) :

---------------begin fb.cpp.ts3points.patch----------------------
--- gnash-0.8.5/gui/fb.cpp.orig 2008-02-19 20:20:49.000000000 +0100
+++ gnash-0.8.5/gui/fb.cpp 2008-04-11 09:58:08.000000000 +0200
@@ -1045,24 +1045,24 @@
void FBGui::apply_ts_calibration(float* cx, float* cy, int rawx, int
rawy) {

   /*
- <UdoG>:
- This is a *very* simple method to translate raw touchscreen
coordinates to
- the screen coordinates. We simply to linear interpolation between
two points.
- Note this won't work well when the touchscreen is not perfectly
aligned to
- the screen (ie. slightly rotated). Standard touchscreen calibration
uses
- 5 calibration points (or even 25). If someone can give me the
formula, tell
- me! I'm too lazy right now to do the math myself... :wink: