Forum

Full Version: eGalax touchscreen calibration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
(9th Jul, 2013 07:29 AM)Markamc Wrote: [ -> ]yup, fixed it and added your changes...i am trying to changeover to linux but,atm I need CADCAM etc for my work...
Maybe multi boot?
You're not wrong! , atm I have virtualbox running too ubuntu. Plays havoc with device managment
(9th Jul, 2013 07:35 AM)Markamc Wrote: [ -> ]You're not wrong! , atm I have virtualbox running too ubuntu. Plays havoc with device managment
Try multi boot, i got it too =).

But to stay on topic, i made an github:
https://github.com/brantje/xbian-touch/

If you want you can change your download links (wget commands)
Code:
https://github.com/brantje/xbian-touch/raw/master/ts_calib.sh
https://github.com/brantje/xbian-touch/raw/master/tslib_1-1_armhf.deb
https://github.com/brantje/xbian-touch/raw/master/uimapper.tar.gz
https://github.com/brantje/xbian-touch/raw/master/uimapper.conf
Using this, will make sure when they download, they got the latest version.
Another idea is to push it into the xbian repo so it can be installed via apt-get install xbian-touch orso.

Are you okey if i copy your blog article to the github readme?
I'm very happy with that, it's great to get some help, many thanks...I'll change my links on the blog

Although it's great to witness...not having had the experience myself, I am, atm, clueless to how that happened!!! especially so quickly. The process of learning the only thing that's keeps me going!

Anyhow thanks!

sligtly off-topic again, is multi-boot an alternative to virtualbox or do you mean multiple-boot at start-up? any link please?
(9th Jul, 2013 08:01 AM)Markamc Wrote: [ -> ]I'm very happy with that, it's great to get some help, many thanks...I'll change my links on the blog

Although it's great to witness...not having had the experience myself, I am, atm, clueless to how that happened!!! especially so quickly. The process of learning the only thing that's keeps me going!

Anyhow thanks!

sligtly off-topic again, is multi-boot an alternative to virtualbox or do you mean multiple-boot at start-up? any link please?
For ubuntu your can download wubi (Windows UBuntu Installer).
That should give you an option on boot what to start (ubuntu or windows).

Github is not so hard when you learn the basics.
(9th Jul, 2013 08:44 AM)brantje Wrote: [ -> ]
(9th Jul, 2013 08:01 AM)Markamc Wrote: [ -> ]I'm very happy with that, it's great to get some help, many thanks...I'll change my links on the blog

Although it's great to witness...not having had the experience myself, I am, atm, clueless to how that happened!!! especially so quickly. The process of learning the only thing that's keeps me going!

Anyhow thanks!

sligtly off-topic again, is multi-boot an alternative to virtualbox or do you mean multiple-boot at start-up? any link please?
For ubuntu your can download wubi (Windows UBuntu Installer).
That should give you an option on boot what to start (ubuntu or windows).

Github is not so hard when you learn the basics.

yep thanks got that already, thought you meant an alternative to virtualbox
the only problem with this is you are now in control and I can no longer make code changes easily......

there is no need to inject a BTN_TOUCH event
so you should change it to this..
Code:
if inrange <= 400:
            if holdtime > 0.20 and holdtime <= 0.50:
                rev.code = BTN_TOUCH
                rev.value = 1
                d.fire_event(rev)
                rev.value = 0
                d.fire_event(rev)
                holdtime = 0
            if holdtime > 0.50 and holdtime <= 1.50:
                rev.code = BTN_RIGHT
                rev.value = 1
                d.fire_event(rev)
                rev.value = 0
                d.fire_event(rev)
                holdtime = 0
            if holdtime > 1.5:
                holdtime = 0
[/align]
Hi all!

If anyone is still interested in my solution, I have uploaded my XBMC 12 image at
https://docs.google.com/file/d/0B__Rs5JF53-kUjE0MjVPeUJ5cnc/edit?usp=sharing
The calibration file is /home/pi/.eGalaxCalibration/touchscreen_axes_calib
You have also usbmount enabled and password for pi user is "a".
The image also contains XBMC12.2 sources in /home/pi/xbmc-12.2 and they are compiled. So, if you want to modify something you just have to run make in that folder(only what you have modified will be compilled)and then sudo make install.

Best Regards,
Andrei
So we have 2 methods for now:

1: Marcamc
+ Outside XBMC, no xbmc patches required will work on later versions.
+ Right click works
- Sometimes a small offset
- Can be laggy (didn't had that yet)

2: bboyandru
+ Inside XBMC, so in future you can launch 'things' with an gesture
+ Maybe Gotham proof, other one is already Gotham proof.
+ Calibration was perfect
- Need to tab a few times for a click is fired

(9th Jul, 2013 10:06 AM)Markamc Wrote: [ -> ]the only problem with this is you are now in control and I can no longer make code changes easily......

there is no need to inject a BTN_TOUCH event
so you should change it to this..
Code:
if inrange <= 400:
            if holdtime > 0.20 and holdtime <= 0.50:
                rev.code = BTN_TOUCH
                rev.value = 1
                d.fire_event(rev)
                rev.value = 0
                d.fire_event(rev)
                holdtime = 0
            if holdtime > 0.50 and holdtime <= 1.50:
                rev.code = BTN_RIGHT
                rev.value = 1
                d.fire_event(rev)
                rev.value = 0
                d.fire_event(rev)
                holdtime = 0
            if holdtime > 1.5:
                holdtime = 0
Done!
(9th Jul, 2013 05:45 PM)brantje Wrote: [ -> ]So we have 2 methods for now:

1: Marcamc
+ Outside XBMC, no xbmc patches required will work on later versions.
+ Right click works
- Sometimes a small offset
- Can be laggy (didn't had that yet)

2: bboyandru
+ Inside XBMC, so in future you can launch 'things' with an gesture
+ Maybe Gotham proof, other one is already Gotham proof.
+ Calibration was perfect
- Need to tab a few times for a click is fired

In my approach you have to tap just once for a click. The previous patches had a bug. With the new patches everything is working very well which means:
- verry sensitive(due to increased click_confines value) single tap for click
- scrollbars can be dragged
- calibration is ok
Also, these patches will work in the next releases, because the principle is the same for click and calibration.
Also, as future work, touch gestures can be added. ;-)

Regards,
Andrei
(9th Jul, 2013 06:36 PM)bboyandru Wrote: [ -> ]
(9th Jul, 2013 05:45 PM)brantje Wrote: [ -> ]So we have 2 methods for now:

1: Marcamc
+ Outside XBMC, no xbmc patches required will work on later versions.
+ Right click works
- Sometimes a small offset
- Can be laggy (didn't had that yet)

2: bboyandru
+ Inside XBMC, so in future you can launch 'things' with an gesture
+ Maybe Gotham proof, other one is already Gotham proof.
+ Calibration was perfect
- Need to tab a few times for a click is fired

In my approach you have to tap just once for a click. The previous patches had a bug. With the new patches everything is working very well which means:
- verry sensitive(due to increased click_confines value) single tap for click
- scrollbars can be dragged
- calibration is ok
Also, these patches will work in the next releases, because the principle is the same for click and calibration.
Also, as future work, touch gestures can be added. ;-)

Regards,
Andrei
Do you have a link to the patch file / diff file?
A complete xbmc installation is abit to big to browse through the changes.
The patch repo is here:

https://github.com/xbianonpi/xbian-patches
(9th Jul, 2013 06:42 PM)brantje Wrote: [ -> ]Do you have a link to the patch file / diff file?
A complete xbmc installation is abit to big to browse through the changes.
The patch repo is here:

https://github.com/xbianonpi/xbian-patches

Actually I have three patches for three files. The archive is at http://code.google.com/p/andrei-development/downloads/detail?name=eGalax_patch_for_XBMC_12.2.zip
Files to be patched are:
<path_to_xbmc>/xbmc/input/linux/LinuxInputDevices.cpp
<path_to_xbmc>/xbmc/input/MouseStat.cpp
<path_to_xbmc>/xbmc/input/MouseStat.h

Andrei
Hi Andrei,

Nice one, I'll try it later.

How do you do the calibration, is it using a program?
It would be possible to script and inject gestures too in python at the event level, although I don't intend on doing it! (need life back!)
Is there also a way to make it optional, hard-coded means it will affect all touchscreen pointer devices in xbmc, so my uimapper-device will also be affected, I think.

The reason I tried a different way was the click_confines was to small for my finger size on a 7" screen, can you change this externally, say in the calib file so I could alter the sensitivity of a touch? Saves me recompiling.

Brantje, I'm sure the calibration should'nt be off, I think the clue was the resolution of your pi, xres 1240. The 'lag' I noticed was probably due to the python error
(9th Jul, 2013 09:31 PM)Markamc Wrote: [ -> ]Hi Andrei,

Nice one, I'll try it later.

How do you do the calibration, is it using a program?
It would be possible to script and inject gestures too in python at the event level, although I don't intend on doing it! (need life back!)

The reason I tried a different way was the click_confines was to small for my finger size on a 7" screen, can you change this externally, say in the calib file so I could alter the sensitivity of a touch? Saves me recompiling.

Brantje, I'm sure the calibration should'nt be off, I think the clue was the resolution of your pi, xres 1240. The 'lag' I noticed was probably due to the python error
Hi Mark!

I did my calibration in Xserver using xinput_calibrator program(you can see how I did this on my blog post at the calibration part). I am sure that this can be done as well with ts_calibrate. If you want to disable my calibration you just have to put the values from the calibration file like this:
calib_x_d=<your screen resolution width> e.g. calib_x_d=1280
calib_y_d=<your screen resolution height> e.g. calib_y_d=720
calib_x_fact=-1
calib_y_fact=-1
My projection is like this:
pointer.x = screen_width - value_read.x * calib_x_fact - calib_x_d;
pointer.y = screen_height - value_read.y * calib_y_fact - calib_y_d;
and the original code is like this:
pointer.x = value_read.x;
pointer.y = value_read.y;
I will modify the patches and add click_confines value to the calibration file this evening.

Andrei
I'm writing a small installer for markamc's method.
Since that doesn't require patching xbmc when a user wants touch support.
Making the installer mostly for my father, since he has 0 knowledge about ssh / linux / etc.


Will look into bboyandru's method when i'm done with this.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Reference URL's