eGalax touchscreen calibration
|
11th Jun, 2013, 01:54 PM
Post: #82
|
|||
|
|||
RE: eGalax touchscreen calibration
(##Disclaimer .....works with 1a5 and beta1 for me)
Ok, this is a long process atm, but does work, for me at least. I was originally looking into changing the xbmc patch, but not had the time yet. Method : TS_CALIBRATE Enter the following, line by line and obviously follow the instructions: Terminal sudo su stop xbmc apt-get install libtool automake build-essential git git clone git://github.com/kergoth/tslib.git cd tslib ./autogen.sh ./configure make make install edit the ts.conf file and remove the '# ' from '# module-raw input' on line:2 using: Terminal nano /usr/local/etc/ts.conf Close and save the ts.conf file Next enter the following at the prompt...... Terminal ls -l /dev/input/by-id The output shows the input event that your touchscreen is linked to, My egalax TS is on /dev/input/event2 Terminal root@xbian:/home/xbian/tslib# ls -l /dev/input/by-id total 0 lrwxrwxrwx 1 root root 9 Jan 1 1970 usb-Riitek_Micro_Keyboard-event-kbd -> ../event0 lrwxrwxrwx 1 root root 9 Jan 1 1970 usb-Riitek_Micro_Keyboard-event-mouse -> ../event1 lrwxrwxrwx 1 root root 9 Jan 1 1970 usb-Riitek_Micro_Keyboard-if01-event-mouse -> ../event1 lrwxrwxrwx 1 root root 9 Jan 1 1970 usb-Riitek_Micro_Keyboard-if01-mouse -> ../mouse0 lrwxrwxrwx 1 root root 9 Jan 1 1970 usb-Riitek_Micro_Keyboard-mouse -> ../mouse0 lrwxrwxrwx 1 root root 9 Jan 1 1970 usb-eGalax_Inc._Touch-event-if00 -> ../event2 root@xbian:/home/xbian/tslib# Paste the following lines at the prompt...... *** NB. change export TSLIB_TSDEVICE=/dev/input/eventX to suit your device event no. where 'X' is your value. Terminal export LD_LIBRARY_PATH=/usr/local/lib export TSLIB_CONSOLEDEVICE=none export TSLIB_FBDEVICE=/dev/fb0 export TSLIB_TSDEVICE=/dev/input/event2 <----*** export TSLIB_CALIBFILE=/etc/pointercal export TSLIB_CONFFILE=/usr/local/etc/ts.conf export TSLIB_PLUGINDIR=/usr/local/lib/ts and then Terminal ts_calibrate Terminal root@xbian:/home/xbian/tslib# ts_calibrate xres = 1280, yres = 720 Took 16 samples... Top left : X = 317 Y = 108 Took 34 samples... Top right : X = 324 Y = 1937 Took 16 samples... Bot right : X = 1863 Y = 1933 Took 19 samples... Bot left : X = 1856 Y = 113 Took 11 samples... Center : X = 1067 Y = 1028 -21.938232 -0.000184 0.646745 -75.615356 0.402788 -0.001534 Calibration constants: -1437744 -12 42385 -4955528 26397 -100 65536 root@xbian:/home/xbian/tslib# The information you want is from the end of the output Terminal Center : X = 1067 Y = 1028 -21.938232 -0.000184 0.646745 -75.615356 0.402788 -0.001534 Top line is X, bottom Y x offest is -21.938232 , x scale factor is 0.646745 y offest is -75.615356 , y scale factor is 0.402788 so for our calib file we need this: Code: calib_x_d=1302;calib_x_fact=-0.647;calib_y_d=796;calib_y_fact=-0.402;swap_axes=1; Create the calib file and enter the above calibration into the editor with: Terminal mkdir /usr/share/eGalaxCalibration nano /usr/share/eGalaxCalibration/touchscreen_axes_calib As you can see, I needed to change the direction of both axes by changing the sign on the scale factor and I also needed to swap the axes too, swap_axes=1. ThHe offset values need to be "subtracted" from those already "programmed" into xbmc patch, hence (1280 -) -22 = 1302 (approx) and (720 -) -76 = 796 Hope it helps bye y'all (##Disclaimer .....works with 1a5 and beta1 for me) |
|||
« Next Oldest | Next Newest »
|
Possibly Related Threads... | |||||
Thread: | Author | Replies | Views: | Last Post | |
[PROBLEM] Touchscreen calibration is wrong and i'm going crazy. | wash | 5 | 19,030 |
17th Jan, 2015 10:34 PM Last Post: wash |
|
Tutorial: Touchscreen calibration & extra features | Markamc | 0 | 7,327 |
2nd Jul, 2013 12:11 AM Last Post: Markamc |