触摸屏校正

来源:互联网 发布:java自动化测试工具 编辑:程序博客网 时间:2024/06/10 03:30

开发板使用6410

Prepare Android enviroment follow this link:
http://source.android.com/source/downloading.html
require many time you need download about 8.5GB
cd <dir enviroment base>/external/
git clone https://github.com/etmatrix/tslib.git
cd tslib
autoreconf -ivs
./configure
cd ../..
# build all files
make libts
make ts/plugins/input
make ts/plugins/pthres
make ts/plugins/dejitter
make ts/plugins/linear
make ts/plugins/variance
make ts_calibrate
make ts_test
##############
# test tslib #
##############
# push all files
adb push out/target/product/generic/system/lib/libts.so /system/lib/libts.so
adb push out/target/product/generic/system/lib/ts/plugins/dejitter.so /system/lib/ts/plugins/dejitter.so
adb push out/target/product/generic/system/lib/ts/plugins/input.so /system/lib/ts/plugins/input.so
adb push out/target/product/generic/system/lib/ts/plugins/linear.so /system/lib/ts/plugins/linear.so
adb push out/target/product/generic/system/lib/ts/plugins/pthres.so /system/lib/ts/plugins/pthres.so
adb push out/target/product/generic/system/lib/ts/plugins/variance.so /system/lib/ts/plugins/variance.so
adb push out/target/product/generic/system/bin/ts_calibrate /system/bin/ts_calibrate
adb push out/target/product/generic/system/bin/ts_test /system/bin/ts_test
# change file external/tslib/etc/ts.conf as need
adb push external/tslib/etc/ts.conf /system/etc/ts.conf
adb shell
# android shell
stop zygote

export TSLIB_TSDEVICE=/dev/touchscreen-1wire //对应显示设备的驱动名字

export TSLIB_CALIBFILE=/system/etc/pointercal

export TSLIB_CONFFILE=/system/etc/ts.conf
export TSLIB_PLUGINDIR=/system/lib/ts/plugins
export TSLIB_FBDEVICE=/dev/graphics/fb1 //这个是显示设备,和自己的设备对应,也许你的设备对应的是=/dev/graphics/fb0,或其他
# calibrate touch
ts_calibrate
# test calibration data
ts_test


 

0 0
原创粉丝点击