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.