有时候事情就是那么奇怪...
-----------编译tslib-1.3----------
[root@Linux tslib-1.3]# tar jxvf tslib-1.3.tar.bz2
[root@Linux tslib-1.3]# cd tslib-1.3
[root@Linux tslib-1.3]# export CC="arm-linux-gcc"
[root@Linux tslib-1.3]# export CXX= arm-linux-g++
[root@Linux tslib-1.3]# ./autogen.sh
[root@Linux tslib-1.3]# export PLUGIN_DIR=$PWD/plugins
[root@Linux tslib-1.3]# ./configure --prefix=/nfs/opt/tslib1.3 --host=arm-linux --enable-inputapi=yes
tslib解压路径下的plugins路径,此环境变量很重要,没有话编译时会报“only absolute run-path ...”的错误
# make
# make install
修改ts.conf
# cd /mnt/nfs/tslib1.3-install/etc
# vi ts.conf
#module mousebuts
module variance xlimit="50" ylimit="50" pthreshold="3"
module dejitter xdelta="1" ydelta="1" pthreshold="3"
module linear
将第一行的“#”去掉,让触摸屏起作用。
错误:
test.sh内容在最下面。
[root@Qiu tslib1.3]# ./test.sh
Segmentation fault
export TSLIB_CALIBFILE=$V_ROOT/etc/pointercal
我之前是用export TSLIB_CALIBFILE=/etc/pointercal 但是在这个目录我已经有这个文件了,导致上面那个错误,所以改个位置或者删除本身目录下的那个文件都能解决问题。
[root@Qiu tslib1.3]# ./test.sh
xres = 240, yres = 320
卡着不动的问题解决:export TSLIB_TSEVENTTYPE=H3600
之前是用export TSLIB_TSEVENTTYPE=event0
这两个错误网上也看到不少人碰到,希望多大家有帮助。
[root@Qiu tslib1.3]# ./test.sh
xres = 240, yres = 320
Took 3 samples...
Top left : X = 224 Y = 764
Took 4 samples...
Top right: X = 776 Y = 807
Took 8 samples...
Bot right: X = 767 Y = 163
Took 12 samples...
Bot left : X = 228 Y = 155
Took 10 samples...
Middle: X = 501 Y = 489
-7.593536 0.256659 -0.001115
318.554565 0.016561 -0.350761
Calibration constants: -497650 16820 -73 20876792 1085 -22987 65536
附上自己的test.sh
export TS_ROOT=/opt/tslib1.3
export TSLIB_TSEVENTTYPE=H3600
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/tsraw0
export TSLIB_CALIBFILE=$TS_ROOT/etc/pointercal
export TSLIB_CONFFILE=$TS_ROOT/etc/ts.conf
export TSLIB_PLUGINDIR=$TS_ROOT/share/ts/plugins
export QWS_SIZE=240x320
export QWS_MOUSE_PROTO="Tslib:/dev/input/tsraw0"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TS_ROOT/lib
cd $TS_ROOT/bin
./ts_calibrate
真不容易啊,看了别人的东西,别人的问题不是自己的问题,学会自己处理问题才是正道啊。
用户1679196 2009-4-8 18:34
用户1679196 2009-4-8 18:33
用户195087 2009-4-8 16:45
用户195087 2009-4-8 16:37