Android multi-touch protocol Improvement

Source: Internet
Author: User

Take the following two points as an example:

Abs_mt_touch_major %abs_mt_position_x abs_mt_position_y syn_mt_report // finger 1 %abs_mt_position_x abs_mt_position_y syn_mt_report // finger 2 syn_report

That is to say, 11 events need to be reported at a sampling time. The utilization rate is too low and packet loss is very likely to occur. Therefore, the format of encode data is shown in the following table.

Bit 31 30 ~ 27 26 ~ 20 19 ~ 10 9 ~ 0
Data Reserved Size Press Y X

  We can see that this encoding format supports LCD with a resolution of less than 1024x1024. It fully meets the current and future project requirements for a long period of time. We name this report format abs_byd_mt_data. Since it is a package upload, syn_mt_report can also be omitted. The modified report order is

Abs_byd_mt_data // finger 1 abs_byd_mt_data // finger 2 syn_report

To support touch projects with more than two fingers, we reserve syn_report. If you modify Android, 256 fingers are supported. Easy to scale

Abs_byd_mt_data // finger 1 abs_byd_mt_data // finger 2... Abs_byd_mt_data // finger 256 syn_report

Of course, this modification may not be recognized by Android. You can modify the upper layer. Define the device class in eventhub. cpp, and then identify the class in keyinputqueue. Java to parse the package. Everything is fine.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.