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
(12th Jun, 2013 04:42 AM)Markamc Wrote: [ -> ]I've modified the instructions slightly to avoid confusion and then tried it out on a fresh beta1 installation with no errors.
Thanks, creating a backup now, will report asap.
Maybe add an ls /dev/input/ to the how to, to show the current input devices.
And i assume event0 or eventX is the touchscreen?
Got it working!!!
Code:
Center : X =  987 Y =  983
-51.846924 0.699852 0.001922
-57.274414 -0.003586 0.418633
Only the x as is messed up so i need to tweak that value abit.
If i touch at most left, the cursor is at x 54-60 orso.
At most right cursor is at 1202

My almost working config:
Code:
calib_x_d=1310;calib_x_fact=-0.637;calib_y_d=778;calib_y_fact=-0.418633;swap_axes=0;

Dou you still have double click issue's? Because i do have to tap a few times before it reacts.
Great news, not ideal but run once it gave me a more accurate solution.

At the moment, the values given by the TS float too much for it to stay within the click-confines values in XBMC. This is because of the sensitivity of the TS. When I recompiled XBMC , i could select and single click when an option was high-lighted. I got tied of recompiling XBMC and didn't request a code change since it would make the mouse less accurate.

Since then, I've tried many things, best one so far was 'python-uinputmapper'. It re-maps and input event to another user-input event. I got it to grab the TS device and apply the calibrations and generate another event which XBMC uses. This is handy since I could use the pointer calib file directly and also add a float and fuzz values fr the TS to stop the jitter effect. I also have nearly found a way to monitor TOUCH duration to inject an BTN_RIGHT event, which would be handy!

Just looking at another solution too, evmapd, another mapping daemon doing a similar thing. My knowledge of python and C are limited, but really enjoying having a go. Prior to getting the Pi, I'd never used linux before.

I'll keep you posted if I get anywhere, you never know Gotham might provide better support

(12th Jun, 2013 06:19 AM)brantje Wrote: [ -> ]Got it working!!!
Code:
Center : X =  987 Y =  983
-51.846924 0.699852 0.001922
-57.274414 -0.003586 0.418633
Only the x as is messed up so i need to tweak that value abit.
If i touch at most left, the cursor is at x 54-60 orso.
At most right cursor is at 1202

My almost working config:
Code:
calib_x_d=1310;calib_x_fact=-0.637;calib_y_d=778;calib_y_fact=-0.418633;swap_axes=0;

Dou you still have double click issue's? Because i do have to tap a few times before it reacts.

Just checking? did you see the crosses to select, I ended up changing the code to move them further into the centre before compilation to avoid having to remove my screen bezel, although I can use it with overscan, it strill works and reports the effective screen resolution
Yea, i saw the crosses and i touched them.
Rerun ts_calibrate gave me this
Code:
Center : X = 1002 Y = 1025
-76.956787 0.700770 0.000343
-55.800903 -0.012320 0.420659
And this one works perfect
Code:
calib_x_d=1358;calib_x_fact=-0.700770;calib_y_d=775;calib_y_fact=-0.420659;swap_axes=0;

Found a nice touch skin:
http://sourceforge.net/projects/xbmccartouch/
Thanks I'll give it a go, having some success with uinput-mapper, i can set a float and fuzz value for the user-event which prevents the jitter and should make it easier to use in xbmc.

Looking into enabling a long-press right-click and using the calib file directly from ts-calibrate, also the ts_calibrate uses a formula which includes a component of x and y in both X and Y calculations to account for skew.
Nice one Brantje, is this the skin you mentioned cartouch, I didn't meeet dependencies, not sure why yet?

UPDATE:
Managed to get python-uinputmapper working in the background to grab eGalax event and create a new inpuit/event.

So far, I can
1. Grab the egalax device
2. Add a new uinput event wiith additional features:
--Flat and fuzz values (to minimise reported events for finger press)
--Ability to swap axis and use the calibration info from ts_calibrate. (Not using the the egalax patch)
--BTN_RIGHT functionally (Inject the BTN_RIGHT event after a long-touch with no movement in a specified range)
--Detect a 'short-press' for selecting instead of double-click (Within a short time and range)

TODO:
1. Clean python code (I'm not a programmer)
2. Maybe set udev ruiles so xbmc can't grab device
2. create a daemon correctly, running in background atm '&'

it works for me with two command lines once set-up, so it is usable, but not ideal and could cause other issues.
(14th Jun, 2013 06:28 AM)Markamc Wrote: [ -> ]Nice one Brantje, is this the skin you mentioned cartouch, I didn't meeet dependencies, not sure why yet?

UPDATE:
Managed to get python-uinputmapper working in the background to grab eGalax event and create a new inpuit/event.

So far, I can
1. Grab the egalax device
2. Add a new uinput event wiith additional features:
--Flat and fuzz values (to minimise reported events for finger press)
--Ability to swap axis and use the calibration info from ts_calibrate. (Not using the the egalax patch)
--BTN_RIGHT functionally (Inject the BTN_RIGHT event after a long-touch with no movement in a specified range)
--Detect a 'short-press' for selecting instead of double-click (Within a short time and range)

TODO:
1. Clean python code (I'm not a programmer)
2. Maybe set udev ruiles so xbmc can't grab device
2. create a daemon correctly, running in background atm '&'

it works for me with two command lines once set-up, so it is usable, but not ideal and could cause other issues.
Maybe if you can share your code, we can include in xbian and set it as an option to run it at boot.
Code clean ups, i don't know to much about python to do this, maybe ask curlymo or koenkk for this.


As for the skin, in addon.xml you have to change the xbmc.gui version from 3 to 4 i thought.

BTW, maybe we can create an topic in Hardware-> Periphal, with all info gathered from this topic.
With what is working / issue's / etc
Been away for a few days....

Yep, no problem, I will post the details, if anyone is interested.

Currently, I start it at boot, in 'init.d' to capture the event before xbmc and it works well, without the need for the patch..,....VIDEO Xbian eGalax

The viideo shows a series of eGalax Touchscreen event presses, duration above 250ms gives an effective double click, above 500ms gives a right click.

It is dedicated to my setup though atm, although it is quite easy to change.

I haven't fully integrated the 'read directly from calib file' yet, but the values used are from ts_calibrate.

will post 'how to' soon

mark
Great news!! You're great Markamc!
Thanks raspuca, very kind, but I'm really a humble noob!.....how are you getting on? you started the thread, so hopefully it's all making sense.
I'm very busy for university Sad but i want to place te raspcar (Big Grin) very soon! I'm very excited for this eheh Smile
Obviously after your new "patch" Smile
(19th Jun, 2013 02:29 PM)Markamc Wrote: [ -> ]Been away for a few days....

Yep, no problem, I will post the details, if anyone is interested.

Currently, I start it at boot, in 'init.d' to capture the event before xbmc and it works well, without the need for the patch..,....VIDEO Xbian eGalax

The viideo shows a series of eGalax Touchscreen event presses, duration above 250ms gives an effective double click, above 500ms gives a right click.

It is dedicated to my setup though atm, although it is quite easy to change.

I haven't fully integrated the 'read directly from calib file' yet, but the values used are from ts_calibrate.

will post 'how to' soon

mark
Cool, vid looks awsome!
What skin are you using?
I thinks it's LightBox Smile
It's immersive, wip. It's in superepo, i think. if not,

http://forum.xbmc.org/showthread.php?tid=139712

I like lightbox and now nbox, but no good for mouse.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Reference URL's