1. 程式人生 > >舊文-linux 觸摸屏校準-2010年02月09日 13:59

舊文-linux 觸摸屏校準-2010年02月09日 13:59

tde 出現 repo auto ogl swa xor linux height

最近更新了sam9263的angstrom,導致觸摸屏不好用了,表現為觸摸不準。當然啟動的時候是有觸摸校準的。google了一番,好像是最新的X是使用Xorg了,不能直接支持tslib了,要使用X的Xf86-input-tslib驅動才行,使用openembedded編譯了該驅動,並將其加入到了文件系統中,修改xorg.conf為: Section "ServerLayout" Identifier "default" InputDevice "atmel-ts" "CorePointer" EndSection #Section "InputDevice" # Identifier "atmel-ts" # Driver "evdev" # Option "SwapAxes" "1" # Option "Device" "/dev/input/touchscreen0" #Option "Calibrate" "1" #EndSection Section "InputDevice" Identifier "atmel-ts" Driver "tslib" Option "CorePointer" "true" Option "SendCoreEvents" "true" Option "Device" "/dev/input/touchscreen0" Option "Protocol" "Auto" Option "Width" "240" Option "Height" "320" Option "EmulateRightButton" "1" #EndSection 啟動後,更加不行了,查看var/log/Xorg.0.log,加載也沒有問題。有可能是編譯xorg時沒有使能tslib。 在xorg.conf中看到,默認是使用的evdev驅動,google了半天其校準的方法,貌似xinput-calibrator才是正道,編譯,復制到文件系統,在串口終端中運行DISPLAY=:0 xinput_calibrator,會出現校準窗口,校準完後就OK了,不過貌似這樣每次啟動後都需要重新校準,無需重新校準的方法,運行xinput_calibrator時會提示的,一種是使用hal,創建一個touchscreen.fdi文件,一種是之間寫到xorg.conf中。 這樣就OK了!! 原來默認啟動時的校準窗口是tslib的校準,僅適用於xf86-input-tslib。

舊文-linux 觸摸屏校準-2010年02月09日 13:59