05/13/2008

Touchscreen works!

A reader of this blog, Rebecca, who worked really hard to port Android on to her C760 found out what the touchscreen issue was and sent me a patch for corgi_ts.c! Thank you very much, Rebecca! Following is a part of mail and patch.
I wrote an applet to detect touch events, and found that the Dalvik VM only received "move" events. There was no action of touch pen up detected. So I modified the corgi-ts driver and added codes in function "ts_interrupt_main()".

@@ -215,6 +220,10 @@
/* Enable Falling Edge */
set_irq_type(corgi_ts->irq_gpio, IRQT_FALLING);
corgi_ts->pendown = 0;
+ /* 2008(R) */
+ input_report_key(corgi_ts->input, BTN_TOUCH, corgi_ts->pendown);
+ input_sync(corgi_ts->input);

This patch works on my C3000, too. Now touchscreen works all the time. Fortunately, I don't need much calibrations for now.

It seems Android wants to know not only pressure becomes zero but also pendown becomes zero. Only two lines but very precious lines.

Again, thank you very much, Rebecca! Your contribution is just great!
posted by 安藤恐竜 at 17:40 | Comment(13) | TrackBack(1) | 日記

広告


この広告は60日以上更新がないブログに表示がされております。

以下のいずれかの方法で非表示にすることが可能です。

・記事の投稿、編集をおこなう
・マイブログの【設定】 > 【広告設定】 より、「60日間更新が無い場合」 の 「広告を表示しない」にチェックを入れて保存する。


×

この広告は1年以上新しい記事の投稿がないブログに表示されております。