Forum
eGalax touchscreen calibration - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Configuration (/forum-17.html)
+--- Thread: eGalax touchscreen calibration (/thread-832.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


RE: eGalax touchscreen calibration - brantje - 9th Jul, 2013 07:32 AM

(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?


RE: eGalax touchscreen calibration - Markamc - 9th Jul, 2013 07:35 AM

You're not wrong! , atm I have virtualbox running too ubuntu. Plays havoc with device managment


RE: eGalax touchscreen calibration - brantje - 9th Jul, 2013 07:47 AM

(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?


RE: eGalax touchscreen calibration - Markamc - 9th Jul, 2013 08:01 AM

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?


RE: eGalax touchscreen calibration - brantje - 9th Jul, 2013 08:44 AM

(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.


RE: eGalax touchscreen calibration - Markamc - 9th Jul, 2013 08:57 AM

(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


RE: eGalax touchscreen calibration - Markamc - 9th Jul, 2013 10:06 AM

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]


RE: eGalax touchscreen calibration - bboyandru - 9th Jul, 2013 04:33 PM

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


RE: eGalax touchscreen calibration - brantje - 9th Jul, 2013 05:45 PM

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!


RE: eGalax touchscreen calibration - bboyandru - 9th Jul, 2013 06:36 PM

(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


RE: eGalax touchscreen calibration - brantje - 9th Jul, 2013 06:42 PM

(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


RE: eGalax touchscreen calibration - bboyandru - 9th Jul, 2013 07:14 PM

(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


RE: eGalax touchscreen calibration - Markamc - 9th Jul, 2013 09:31 PM

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


RE: eGalax touchscreen calibration - bboyandru - 9th Jul, 2013 10:02 PM

(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


RE: eGalax touchscreen calibration - brantje - 9th Jul, 2013 10:05 PM

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.