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
Can you put the new patch on pastebin and link it here?
Here you go http://pastebin.com/yWg5JeDu. I altered the eGalaxTouchScreen.patch from the git with my new line of code.

Now I only have to figure out a nice way to access the context menu with only single leftclick avialable. Atm I use XBMC Commander on the phone or the pad or a usb keyboard for that.
(28th May, 2013 03:43 PM)TobyM Wrote: [ -> ]Here you go http://pastebin.com/yWg5JeDu. I altered the eGalaxTouchScreen.patch from the git with my new line of code.

Now I only have to figure out a nice way to access the context menu with only single leftclick avialable. Atm I use XBMC Commander on the phone or the pad or a usb keyboard for that.
Well maybe an double click / long click?
(28th May, 2013 12:44 AM)TobyM Wrote: [ -> ]The working touchscreen_axes_calib for a Acer T230H are:
For 720p Resolution:
calib_x_d=1280;calib_x_fact=-0.66667;calib_y_d=720;calib_y_fact=-0.666667;swap_axes=0;

For 1080p Resolution:
calib_x_d=1920;calib_x_fact=-1.0;calib_y_d=1080;calib_y_fact=-1.0;swap_axes=0;
Additional Info can be provided if needed.
Hi mate,
Thanks for getting it fixed.
However, i connected my touchscreen via RCA, since there is no HDMI connector.
The resolution is 720x480, so that the 420p resolution right?
How can i generate an config file for that resolution?
The equation is,

m_mouseX = g_graphicsContext.GetWidth() - (int)(((float)levt.value) * (calib_x_fact)) - calib_x_d;
1280 - ((Touch screen values) * -0.666) - 1280
and for 1080 1920 - ((Touch screen values) * -0.666) - 1920

If you change the overscan though in config.txt or video calibration, this constant g_graphicsContext.GetWidth() effects the calibration values, so you can alter the last value to change the offset back to corner of screen.

hope this makes sense
So from this
Quote:calib_x_d=1280;calib_x_fact=-0.66667;calib_y_d=720;calib_y_fact=-0.666667;swap_axes=0;
I change it to this
Quote:calib_x_d=720;calib_x_fact=-0.33334;calib_y_d=480;calib_y_fact=-0.333334;swap_axes=0;
you can try, although you might have to tweak the calib_x_d values, if it is using overscan when using RCA, i found it helpful having the pointer values displayed on screen so you can see the offset of the pointer to the touch onscreen. you only need to change addon.xml in chosen skin (default is skin.confluence) debugging to "true".

The raw x-y data from egalax, is like yours it gives 0-2047 points over the x-y coordinates of the screen also, so it will be worth calculating the scale factors again too, don't think they are far off though.
Afaik i don't use any overscan.
Will test those value's when new beta is ready.
hello everybody,

my touchscreen is working, but i have a little problem. in the middle of the screen the touch is very well calibrated. but when i touch the corners, the mouse position is on another position than i have touched. for example: if i touch in the upper right corner, the mouse position is about 1cm down and 1cm left. on the upper left corner, the mouse position is 1cm down and 1cm right. this is very strange. i have done video calibration so that the xbian will not fill the whole screen, but this should not be the solution?!

hope you can help.
The video calibration in xbmc will affect the calibration values, again , if you have the pointer values set in the addon.xml, you can see how it scales the max/min pointer position. You need then to edit the scale factor and offsets to suit. I need to do this atm to fit my 7" screen within a 6.5" bezel. Hence values are different.

To move the pointer back to top-left, I need to make the calib_x_d / y_d values bigger , but if it doesn't reach the right-hand side then you need to change the scale facotrs also. Use putty to start and stop xbmc and change the values in the calib file to suit
Got it almost working, only thing left is the axes.
With swap_axes=1:
up is down, left is right.

And with swap_axes=0:
up is right, left is down.
(6th Jun, 2013 06:33 PM)brantje Wrote: [ -> ]Got it almost working, only thing left is the axes.
With swap_axes=1:
up is down, left is right.

And with swap_axes=0:
up is right, left is down.

To change direction change the sign of the calib_x_fact from plus to minus or vice versa
(6th Jun, 2013 09:50 PM)Markamc Wrote: [ -> ]
(6th Jun, 2013 06:33 PM)brantje Wrote: [ -> ]Got it almost working, only thing left is the axes.
With swap_axes=1:
up is down, left is right.

And with swap_axes=0:
up is right, left is down.

To change direction change the sign of the calib_x_fact from plus to minus or vice versa
They are already in the minus -0.66667 and if i remove it, then the cursor won't show up, also adding + doesn't help.
OK, so you need to keep swap_axes = 1,

this should gives you the correct movement, albeit in the wrong direction.
So next get the direction correct:
the equation, is desired pointer_position = constant - (scale-factor*reported-touch-position) - constant

the first constant is fixed at " the graphicsContext.GetWidth() value . You can find this by using the debugging 'true' in addon.xml and then moving mouse to maximum screen positions in xbmc. The display at the top will show pointer x,y values.

So, now you should know the value used internally in xbmc, the sign of the scale factor will add/subtract the scaled touch position, so you need the correct 'calib_y_d' value, in theory should be the same as the first constant , but you can change to bring the pointer back in place. Initially set this the same as the maximum pointer values on screen.

The formula in xbmc was written by Andrei, it doesn't need the initial constant really.

If you cannot see pointer, at least the reported position may give you an indication that the hardware is working


(as an aside, I've been looking into opengalax or python-uinput-mapper and python-evdev. these run as a daemon and remap the evdev egalax input/event to another uinput device which drive xbmc; advantages are by using a user generated input/event, it sorts the calibration externally to xbmc and allows for calibration parameters and possibly right-click)
Well i'm sure the hardware is working.
Testing now the internal value's.
Resolution is now 1280x720, since i can connect my uhdmi->vga from my tablet to the raspberry using a uhdmi->hdmi converter.
(7th Jun, 2013 12:34 AM)Markamc Wrote: [ -> ]the first constant is fixed at " the graphicsContext.GetWidth() value . You can find this by using the debugging 'true' in addon.xml and then moving mouse to maximum screen positions in xbmc. The display at the top will show pointer x,y values.

So, now you should know the value used internally in xbmc, the sign of the scale factor will add/subtract the scaled touch position, so you need the correct 'calib_y_d' value, in theory should be the same as the first constant , but you can change to bring the pointer back in place. Initially set this the same as the maximum pointer values on screen.

The formula in xbmc was written by Andrei, it doesn't need the initial constant really.
Well with the 'mouse' in the right-bottom corner xbmc reports: 1260,706.
I can't get the mouse in the right-corner, max i could get is 1266,146
ok, so the calib file values are?

calib_x_d=1280;calib_x_fact=-0.66667;calib_y_d=720;calib_y_fact=-0.666667;swap_axes=0;

as before
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Reference URL's