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
I don't have a touchscreen. The patch was suggested by @brantje, so he should test if what Markamc suggests works for more users.
I'm installing with the guide...when the installation is finished can I do the image of all? So the next time i don't need to remake all!
Thanks
(26th Apr, 2013 09:18 PM)raspuca Wrote: [ -> ]I'm installing with the guide...when the installation is finished can I do the image of all? So the next time i don't need to remake all!
Thanks

Hi Luca,

I had to re-"make" every time i modified the files in order to find a solution to get the "click" to work for my touchscreen. Initially, 12 hours for full code and then considerably less for minor modifications. The original patch seems to work for some but not for all, so the patch needs to be revised in xbmc. At the moment I use my modified version until it's ..."not just me!!" Rolleyes

let me know how you are getting on...I will help if I can

cheers

mark

To be honest, love xbmc but not necessarily the best touchscreen carpc solution; looking forward to wayland/weston and qt for my carpi project. Already compiled wayland/weston on pi (tutorial) the touchscreen worked no problem. Lets hope the development of "xbian-wayland" gets back on-track with the recent release of wayland 1.1...great things to come
I'm very interested in wayland/weston!! Do you have an example of the final result of the carpi project? An example too!!
Thanks a lot!!
(25th Apr, 2013 07:32 AM)Markamc Wrote: [ -> ]Hi Luca,

I have my egalax touch screen (car-pc project) working and calibrated with Xbian. I used the Xbian image, it has the kernel modules necessary for touchscreen support. The only thing I did was follow the guide to re-compile xbmc with the patched files from Andrei included. Follow this guide, it worked for me, then you can add the file: usr/share/eGalaxCalibration/touchscreen_axes_calib, with you data and modify the values to adjust your screen calibration (as Andrei describes)

https://github.com/xbianonpi/xbian/wiki/Compiling-XBMC-&-XBMC-dependencies

The only thing I needed to do was remove some coding (link below) as I have stated on Andrei's blog, so I could achieve a double click; I found I had no click just a constant mousedrag error in xbmc

http://engineering-diy.blogspot.co.uk/2013/02/raspberry-pi-raspbian-xbmc-and-egalax-7.html?showComment=1364419629030#c8991511687109589988

Don' forget to make a swapfile, I needed to, to compile XBMC on 256mb pi

For reference, I needed to play with the offset and scale values in the calib file for my 7" 1280x720 touchscreen,
calib fle parameters are as follows:

calib_x_d=1280;calib_x_fact=-0.625;calib_y_d=760;calib_y_fact=-0.374799606;swap_axes=0;

(i scaled the values t fit within a bezel around the screen)

Hope this helps

mark
Bezel like this one?
http://pbrd.co/1236I7F

@curly
Code:
xbian@xbian ~ $ cat /proc/bus/input/devices
xbian@xbian ~ $ lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen
xbian@xbian ~ $
Device attached properly but xbian doesn't detect it anymore.

Maybe if we can get this thing working and calibrated, write some program for easy calibration?
Also an xbian touchscreen skin can be an idea.
Similar,
http://pbrd.co/19fJGNm

nbox skin (xbmc wip)
http://pbrd.co/19fLJkG

I retrofitted a 7" touch to the factory radio BMW X5. I use openBM daemon monitoring the IBUS on the car to detect radio button events to control XBMC. Also, to maintain original nav system, i have a jammaboard/hdmi switch to swap screens between xbian and on-board-display.

I tried 12.2, but think to fix the dual pointer issues the egalax patch has been removed. I have compiled 12.2 and 13.0 with my modified egalax patch to get my screen working again, no problems, just need to double click. I need to recompile for every new version to maintain my setup.

Hopefully going to use this skin when finished for version 13.0 - http://forum.xbmc.org/showthread.php?tid=159291&page=9

@raspuca - I have only compiled wayland 1.1 with weston desktop -- no software yet early days.
Can you share the patch so that you don't need to recompile every time?
Because now the touchscreen isn't found by xbian.
(13th May, 2013 05:01 AM)brantje Wrote: [ -> ]Can you share the patch so that you don't need to recompile every time?
Because now the touchscreen isn't found by xbian.

As described in earlier post, I apply the xbian patches in the build process, and then replace the MouseStat.cpp file with the original (unpatched) version, and remove the a few lines of code from LinuxInputDevices.cpp file, this was causing a mousedrag for me.

I think @CurlyMo was waiting for some other users to test before committing changes, It would be great, as it takes quite a while to compile.
Quote: and remove the a few lines of code from LinuxInputDevices.cpp
Which lines?
the egalax patch...https://github.com/xbianonpi/xbian-patches/blob/master/xbmc/eGalaxTouchScreen.patch

adds these lines (34-40) to the file /xbmc/input/linux/LinuxInputDevices.cpp

I edited the file and removed them before the build process.

Terminal

+ /* [touchscreens] when PRESS or RELEASE action occurs */
+ if(levt.code == BTN_TOUCH)
+ {
+ m_mouseX = g_graphicsContext.GetWidth() + 1;
+ m_mouseY = g_graphicsContext.GetHeight() + 1;
+ }
+

They were preventing me clicking the screen by always producing a "mousedrag" action instead of "mouseclick". I also removed the MouseStat.cpp patches by using the original file. Now I (and a couple more) can double click "tap" and prevent the constant "mousedrag".
@Markamc
Hi! I'm doing the installation that you linked to me..
But the patches of Andrei have to be apply BEFORE or AFTER the "make" (12h) of XBMC?
Thanks a lot guy!!
You really need to apply the patches before the "make" to ensure it works.

The egalax patch has been removed from the xbian-patches since 12.2, so i had to apply them manually. I compiled 12.2 last night, successfully with working egalax touchscreen as I have described and soon hope to post and image so you can test without having to compile. You will need to edit the "touchscreen_axes_calib" file with your values though.

I am trying to find a better way to calibrate , using "evtest" maybe as an addon.

good luck, will update post when ready

cheers
mark
Ok, so I wait your wonderful work eheh Big Grin
Can you provide the new egalaxtouschreen patch? I will readd it then.
http://pastebin.com/gp383gEd

Here's the link to the modified patch I did, basically removing the MouseStat.cpp patches and commenting out approx five lines from the LinuxInputDevices.cpp section as described above.

I am currently uploading an image, it works with "double click" on my egalax screen on 12.2 xbianalpha5; there are some issues with the image, i needed to recover my SDcard after corruption.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Reference URL's