Hi there,

I have ported (am porting) Gingerbread to my device and I made a
custom touchscreen 5-point calibration method. This is my port:
http://sourceforge.net/p/ipaq214android/android/ci/c01dc0839a8a86a74959f197ee99433da6805ead/tree/

==Relevant files==
InputReader.cpp.diff
InputReader.h.diff
ipaq214/wm97xx-touchscreen.idc

Files `InputReader.*.diff` are modifications to the framework to allow
using the 5-point calibration method by the idc file.
For the idc file you need to use the correct name. Some info is here:
http://source.android.com/tech/input/input-device-configuration-files.html
Note that lines 26-32 in `wm97xx-touchscreen.idc` is applicable only
for patched framework.
The idc file is copied to system/usr/idc in device.mk.

In order to use the calibration, you need to have an existing Linux
distribution that has TSLib built with it, calibrate it once, and get
the /etc/pointercal file after calibration. Then divide all the
numbers by the last number (should be 65536?) and replace line 27-32
of the idc file by the numbers.

The reason for me to use the idc file instead of etc/pointercal is
that I wanted to follow the standard. Obviously, using this method
isn't a really good way as calibration cannot be done dynamically.

For me, I used the "Pointer Location" in "Dev Tools" (ENG build) to
test the touchscreen pointer location.

I hope this helps.

Good luck,
Alvin Wong


On 4月5日, 下午11�r58分, 李晖 <[email protected]> wrote:
> hi, all
>     I am porting android 2.3.7 to a ARM Cortex-A8 board, currently, the
> system can boot up, but the touch screen can not work correctly, when I
> slide left on the screen, the notification view show up, slide right, the
> notification view gone, slide up, the screen goes left, slide down, the
> screen goes right, did anyone came across this problem?
>     BTW, I searched in the Internet and found that to calibrate the
> touchscreen, we can change the value in the system/etc/pointercal file
> which read by
> frameworks/base/services/java/com/android/services/InputDevice.java file,
> but there is no such file in the gingerbread source tree as the calibrate
> method has changed, did anyone knows how to calibrate the touch screen in
> android 2.3, thanks in advance!
>
> andy
> Best Regards
> -------------------------------------------------------------------
> -------------------------------------------------------------------
> 北京航空航天大学大学嵌入式系统实验室
> 新主楼G座1028室
> 李晖
> MSN:[email protected]

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to