Re: Touch Screen Calibration Tool

2008-12-18 Thread Juan Jesús Ojeda Croissier
Hi Jeff,

On Thu, Dec 18, 2008 at 9:51 PM, Jeff yam...@gmail.com wrote:
 Hello.

 I have been using the Ubuntu Mobile distro in my Car PC and I love the new
 Hildon arrangement that makes it very touch friendly. However I cannot use
 my Touch Screen at all.

 Over at MP3Car.com here is a link to the forum where we have been trying to
 unearth an answer to our
 problems: 
 http://www.mp3car.com/vbulletin/linux/126313-linux-touch-screen-problem.html


 The current calibration tool is useless and the current drivers are
 uninstallable. The tool that appears to have an answer only appers as a mock
 up and I cannot find a package that contains the magical tool. The tool I am
 referring to is on Ogra's blog on this
 page:http://ograblog.wordpress.com/2008/10/03/the-ubuntu-mobile-beta-images/#comments

 If you have a solution, a few of us Linux junkies would love to test a beta
 solution.

Actually, I think I got the same touchscreen a work in a project I'm
working on.
I have Ubuntu Mobile (customized) working on a VIA EPIA Mini-ITX with
the touchscreen you were talking about on the forum:
r...@rothera:~# lsusb
Bus 002 Device 002: ID 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen

And is working. Actually was working from the begining, but the
calibrate was a mess. The cursor was doing weird things.
Now I almost have the perfect calibrate. I still testing options.

The driver I use is evtouch (xserver-xorg-input-evtouch) and I leave
hal to configure the Xorg. On Intrepid (at least) Hal gets the info of
the device from his database and the device itself and generate (on
the fly) the proper virtual xorg.conf.
Actually, the info for configuring the eGalax TouchScreen is stored
for this package on:
/usr/share/hal/fdi/policy/10osvendor/50-eGalax.fdi

But, at least for my screen, were wrong, so I had to changed them.
My first step was detect the max a min with the script the driver provide:
/usr/bin/calibrate_touchscreen

This script gave me the max (X/Y) and min (X/Y), and with those
details I could change the defaults values on the fdi file. The best
way to change that is to copy
/usr/share/hal/fdi/policy/10osvendor/50-eGalax.fdi into
/etc/hal/fdi/policy/ and then, change the values you need.
On that way, you don't mess with the original files (which will be, or
try to be, changed on any update of this package) but still will be
used. In fact, the files on /etc/hal/fdi/* will have more priority
than from /usr/share/hal/fdi/.

To see is the changes were made you need to restart hal:
$ /etc/init.d/hal restart
and then you can see the x11 options changed  by doing:
$ UDI=$(hal-find-by-capability --capability input.mouse)
$ lshal -u $UDI

Those command gives you something like:
udi = 
'/org/freedesktop/Hal/devices/usb_device_eef_1_noserial_if0_logicaldev_input'
  info.capabilities = {'input', 'input.mouse'} (string list)
  info.category = 'input'  (string)
  info.parent =
'/org/freedesktop/Hal/devices/usb_device_eef_1_noserial_if0'  (string)
  info.product = 'eGalax Inc. Touch'  (string)
  info.subsystem = 'input'  (string)
  info.udi = 
'/org/freedesktop/Hal/devices/usb_device_eef_1_noserial_if0_logicaldev_input'
 (string)
  input.device = '/dev/input/event1'  (string)
  input.originating_device =
'/org/freedesktop/Hal/devices/usb_device_eef_1_noserial_if0'  (string)
  input.product = 'eGalax Inc. Touch'  (string)
  input.x11_driver = 'evtouch'  (string)
  input.x11_options.longtouched_action = 'click'  (string)
  input.x11_options.longtouched_button = '3'  (string)
  input.x11_options.longtouchtimer = '750'  (string)
  input.x11_options.maxx = '1912'  (string)
  input.x11_options.maxy = '1989'  (string)
  input.x11_options.maybetapped_action = 'click'  (string)
  input.x11_options.maybetapped_button = '1'  (string)
  input.x11_options.minx = '112'  (string)
  input.x11_options.miny = '76'  (string)
  input.x11_options.movelimit = '10'  (string)
  input.x11_options.oneandhalftap_button = '2'  (string)
  input.x11_options.rotate = 'ccw'  (string)
  input.x11_options.swapy = true  (bool)
  input.x11_options.taptimer = '30'  (string)
  input.x11_options.touched_drag = '1'  (string)
  linux.device_file = '/dev/input/event1'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/class/input/input1/event1'  (string)


So you can see the options hal has for the device. Now you need to be
sure there is not a any configurtion about the Input Device on the
xorg.conf file, to let hal configuring the X.

I paste you my fdi file for the eGalax TouchScreen, in case this help you:
?xml version=1.0 encoding=UTF-8? !-- -*- SGML -*- --
deviceinfo version=0.2
  device
match key=info.product contains=eGalax
  match key=info.capabilities contains=input
merge key=input.x11_driver type=stringevtouch/merge
merge key=input.x11_options.minx type=string112/merge
merge key=input.x11_options.miny type=string76/merge
merge 

Re: Touch Screen Calibration Tool

2008-12-18 Thread Juan Jesús Ojeda Croissier
On Fri, Dec 19, 2008 at 5:37 AM, Jeff yam...@gmail.com wrote:
 @juan

 you are awesome

 heres what i did:

 reinstalled the calibrate ts package in the repository

 opened /usr/share/hal/fdi/policy/10osvendor/50-eGalax.fdi

 changed the max/min value (this took the longest to realize somethimg
 obvious)
 after restarting X 50 billion times here is the final file for

  /usr/share/hal/fdi/policy/10osvendor/50-eGalax.fdi

 __code
 ?xml version=1.0 encoding=UTF-8? !-- -*- SGML -*- --
 deviceinfo version=0.2
   device
 match key=info.product contains=eGalax
   match key=info.capabilities contains=input
 merge key=input.x11_driver type=stringevtouch/merge
 merge key=input.x11_options.minx type=string70/merge
 merge key=input.x11_options.miny type=string70/merge
 merge key=input.x11_options.maxx type=string1900/merge
 merge key=input.x11_options.maxy type=string1900/merge
 merge key=input.x11_options.taptimer type=string30/merge
 merge key=input.x11_options.longtouchtimer
 type=string750/merge
 merge key=input.x11_options.longtouched_action
 type=stringclick/merge
 merge key=input.x11_options.longtouched_button
 type=string3/merge
 merge key=input.x11_options.oneandhalftap_button
 type=string2/merge
 merge key=input.x11_options.movelimit type=string10/merge
 merge key=input.x11_options.touched_drag type=string1/merge
 merge key=input.x11_options.maybetapped_action
 type=stringclick/merge
 merge key=input.x11_options.maybetapped_button
 type=string1/merge
 merge key=input.x11_options.rotate type=stringcw/merge
 merge key=input.x11_options.swapx type=boolfalse/merge
 merge key=input.x11_options.swapy type=boolfalse/merge
   /match
 /match
   /device
 /deviceinfo

 /code


 the rotate needed to be clockwise
 and i didnt swap x or y

 the MAX abslt edge is is 2000 the min edge is 0
 then i bumbed it inside so to give me some room to touch it.

 Thanks so much for helping! i had no idea about those fdi files

No, thanks to you for the clockwise and swapx/y thing. You save me
from restart the X server lots of time more :-)

Cheers :-)

-- 
Juanje

-- 
Ubuntu-mobile mailing list
Ubuntu-mobile@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile