I've hit the same issue with the scaling problem - the balloon3 board
and UCB1400 touchscreen driver give erroneous positions for the
coordinates in X but work perfectly in the tslib test programs.

I'd estimate that only 25% of the screen is usable - 50% horizontal, 50%
vertical.

Whilst I don't doubt that it works on some platforms, this bug does make
xf86-input-tslib unusable on other systems, which is an important bug.

# cat /etc/pointercal 
47304 105 -3453232 -1882 -52108 47463896 65536

Bottom right:
1218048546.736937:    450    604    549
1218048546.796972:    446    630      0
Cursor position when stylus is at bottom right:
1218048591.786899:    195    389    515
1218048591.816937:    192    389    533
1218048591.846896:    192    388    557
1218048591.876903:    193    386    551
1218048591.936970:    196    422      0

Bottom left:
1218048613.386881:     69    616    431
1218048613.446964:     44    627      0
Cursor position when stylus is bottom left:
1218048637.006940:     60    400    590
1218048637.006940:     60    400    590
1218048637.036923:     60    397    578
1218048637.066965:     60    395      0

Top right:
1218048657.816908:    453     22    461
1218048657.876973:    456     -2      0
Cursor position when stylus is top right:
1218048684.427122:    198     63    488
1218048684.477000:    197     65      0

Top Left:
1218048701.016910:     12     52    579
1218048701.076984:     46     31      0
1218048703.076905:     58     51    563
1218048703.106952:     51     46    575
1218048703.136971:     47     42      0
1218048705.856917:     61     47    546
1218048705.916977:     30     48      0
1218048706.616904:     39     87    558
1218048706.676978:     36     49      0
1218048707.686902:     46     67    522
1218048707.717011:     46     67      0
Cursor position with stylus at top left:
1218048751.136910:     56     84    552
1218048751.166915:     53     83    538
1218048751.227088:     51     56      0

I've tested by making this simple change in src/tslib.c:

--- xf86-input-tslib-0.0.4.orig/src/tslib.c
+++ xf86-input-tslib-0.0.4/src/tslib.c
@@ -224,12 +224,12 @@
                        return !Success;
                }
 
-               InitValuatorAxisStruct(device, 0, 0, /* min val */ 1023,        
/* max val */
+               InitValuatorAxisStruct(device, 0, 0, /* min val */ 480, /* max 
val */
                                               1024,    /* resolution */
                                               0,       /* min_res */
                                               1024);   /* max_res */
 
-               InitValuatorAxisStruct(device, 1, 0, /* min val */ 1023,        
/* max val */
+               InitValuatorAxisStruct(device, 1, 0, /* min val */ 680, /* max 
val */
                                               1024,    /* resolution */
                                               0,       /* min_res */
                                               1024);   /* max_res */

This gives me an almost perfectly operational X server and touchscreen.


-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/


Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to