
Scale the value read from the touch driver x and y) in order to fit 0->width range and respectively 0->height range of the "touch panel physical size frame" the scale value for x axis is:Ĭalib_x_fact = -Ĭalib_y_fact =. In order to do this we need to do three steps(the third one is done in software):Ī. Our main scope is to overlap the "touch panel values frame" to the "touch panel physical size frame". "touch panel values frame" is the frame which contains all the number the touch controller is giving."touch panel physical size frame" is the screen starting from (0,0) on the left top corner and going to (width, height) in the right bottom corner.

When we are pressing the touch we are moving in the "touch panel physical size frame" but when the touch screen is not calibrated the arrow from XBMC is in another place. In the picture above, we see that "touch panel values frame" differs from "touch panel physical size frame".

The simplest way to swap axes is to switch the four wires cable plug's orientation which comes from the touchscreen to the touch controller. It will contain four values for the axes calibration and one value for swapping axes. Touchscreen calibration.Ĭreate a new file /home/pi/touchscreen_axes_calib on Raspberry PI. Patch -p1 /xbmc/input/linux/LinuxInputDevices.cpp /xbmc/input/MouseStat.cpp /xbmc/input/MouseStat.h < MouseStat_h.patch 4. Note: After downloading XBMC archive, get this archive and unpack it anywhere.

Build XBMC 12 on Raspberry PI using this tutorial. Build your own kernel with eGalax touchscreen support, like in this post(you will only need to replace kernel.img file and /lib/modules and /lib/firmware folders on the SD card).ģ.

Get latest Raspbian image from here and flash it to an SD card.Ģ. Here is what you need to do in order to have a system with Raspberry PI, Raspbian OS and XBMC 12 Frodo stable with eGalax touchscreen working correctly(which means axes calibrated and click working with just one tap&release action):ġ. Edit: Download the latest image from the top right corner of this blog(username: pi, password: a).
