树莓派 添加 7寸触摸屏

触屏买回来  好久没有用,最近发现他是可触摸的。鼓捣了一下。

个人使用的是树莓派官方推荐系统, 版本是

这个版本最好的地方在于,内核已经编译了eGalax触屏,apt-get upgrade  更新系统到最近即可使用触屏。

给触屏校准就可以了,校准工具xinput-calibrator, 直接wget到本地,解压编译。  校准工具地址http://github.com/downloads/tias/xinput_calibrator/xinput_calibrator-0.7.5.tar.gz

 

版本 Kernel version:3.18  编译肯定不成功因为缺少,依赖包。一个老外的解答是:

Install some dependencies:
sudo apt-get install libx11-dev libxext-dev libxi-dev x11proto-input-dev  xorg-dev

他说缺少这几个包。 下载安装。

这些可能不全都用到,自己知识有限也不清楚,都安装了。

OK 启动xinput_calibrator  ,工具会提示你电机红色十字架校对点。 然后反馈输出类似:

Calibrating EVDEV driver for “eGalax Inc. USB TouchController” id=8
current calibration values (from XInput): min_x=1938, max_x=114 and min_y=1745, max_y=341
Doing dynamic recalibration:
Setting new calibration data: 121, 1917, 317, 1741
–> Making the calibration permanent <–
copy the snippet below into ‘/etc/X11/xorg.conf.d/99-calibration.conf’
Section “InputClass”
Identifier “calibration”
MatchProduct “eGalax Inc. USB TouchController”
Option “Calibration” “121 1917 317 1741″
Option “SwapAxes” “1″
EndSection
 
按照提示 复制Section信息 到 /etc/X11/xorg.conf.d/99-calibration.conf
同时再写到文件 /usr/share/X11/xorg.conf.d/01-input.conf
 
reboot   可以了

 

posted @ 2015-05-08 17:25  lunsa  阅读(2089)  评论(0编辑  收藏  举报