2.输入子系统学习-multi-touch-protocol-2023.02

Documentation/input/multi-touch-protocol.txt(百度翻译)

Multi-touch (MT) Protocol -------------------------
    Copyright (C) 2009-2010    Henrik Rydberg <rydberg@euromail.se>

一、Introduction 
 ------------
 In order to utilize the full power of the new multi-touch and multi-user devices, a way to report detailed data from multiple contacts, i.e., objects in direct contact with the device surface, is needed.  This document describes the multi-touch (MT) protocol which allows kernel drivers to report details for an arbitrary number of contacts.
 为了充分利用新的多点触摸和多用户设备的功能,需要一种报告来自多个触点(即,与设备表面直接接触的对象)的详细数据的方法。本文档描述了多点触摸(MT)协议,该协议允许内核驱动程序报告任意数量触点的详细信息。
 The protocol is divided into two types, depending on the capabilities of the hardware. For devices handling anonymous contacts (type A), the protocol describes how to send the raw data for all contacts to the receiver. For devices capable of tracking identifiable contacts (type B), the protocol describes how to send updates for individual contacts via event slots.
根据硬件的功能,协议分为两种类型。对于处理匿名触点(类型A)的设备,协议描述了如何将所有触点的原始数据发送给接收方。对于能够跟踪可识别触点(类型B)的设备,协议描述了如何通过事件槽发送单个触点的更新。
 

二、Protocol Usage  //协议使用方法 
 --------------
 Contact details are sent sequentially as separate packets of ABS_MT events. Only the ABS_MT events are recognized as part of a contact packet. Since these events are ignored by current single-touch (ST) applications, the MT protocol can be implemented on top of the ST protocol in an existing driver.
 触点详细信息作为ABS_MT事件的单独数据包依次发送。只有ABS_MT事件被识别为触点数据包的一部分。由于当前的单触(ST)应用程序忽略了这些事件,因此MT协议可以在现有驱动程序中的ST协议之上实现。
 Drivers for type A devices separate contact packets by calling input_mt_sync() at the end of each packet. This generates a SYN_MT_REPORT event, which instructs the receiver to accept the data for the current contact and prepare to receive another.
 A类设备的驱动程序通过在每个数据包的末尾调用input_mt_sync()来分离触点数据包。这将生成SYN_MT_REPORT事件,该事件指示接收方接受当前触点的数据并准备接收另一个触点。
 Drivers for type B devices separate contact packets by calling input_mt_slot(), with a slot as argument, at the beginning of each packet. This generates an ABS_MT_SLOT event, which instructs the receiver to prepare for updates of the given slot.
 B类设备的驱动程序通过调用input_mt_slot()(在每个数据包的开头,以slot作为参数)来分离触点数据包。这将生成ABS_MT_SLOT事件,该事件指示接收器准备更新给定时隙。
 All drivers mark the end of a multi-touch transfer by calling the usual input_sync() function. This instructs the receiver to act upon events accumulated since last EV_SYN/SYN_REPORT and prepare to receive a new set of events/packets.
 所有驱动程序都通过调用通常的input_sync()函数来标记多点触摸传输的结束。这指示接收器对自上次EV_SYN/SYN_REPORT 以来累积的事件采取行动,并准备接收一组新的事件/分组。
 The main difference between the stateless type A protocol and the stateful type B slot protocol lies in the usage of identifiable contacts to reduce the amount of data sent to userspace. The slot protocol requires the use of the ABS_MT_TRACKING_ID, either provided by the hardware or computed from the raw data [5].
 无状态类型A协议和有状态类型B插槽协议之间的主要区别在于使用可识别的触点来减少发送到用户空间的数据量。时隙协议要求使用ABS_MT_TRACKING_ID,由硬件提供或根据原始数据计算[5]。
 For type A devices, the kernel driver should generate an arbitrary enumeration of the full set of anonymous contacts currently on the surface. The order in which the packets appear in the event stream is not important.  Event filtering and finger tracking is left to user space [3].
 对于类型A设备,内核驱动程序应该生成一个当前在表面上的所有匿名触点的任意枚举。数据包在事件流中出现的顺序并不重要。事件过滤和手指跟踪留给用户空间[3]。
 For type B devices, the kernel driver should associate a slot with each identified contact, and use that slot to propagate changes for the contact. Creation, replacement and destruction of contacts is achieved by modifying the ABS_MT_TRACKING_ID of the associated slot.  A non-negative tracking id is interpreted as a contact, and the value -1 denotes an unused slot.  A tracking id not previously present is considered new, and a tracking id no longer present is considered removed.  Since only changes are propagated, the full state of each initiated contact has to reside in the receiving end.  Upon receiving an MT event, one simply updates the appropriate attribute of the current slot.
 对于B类设备,内核驱动程序应该将一个槽与每个标识的触点相关联,并使用该槽传播触点的更改。通过修改相关插槽的ABS_MT_TRACKING_ID来创建、替换和销毁触点。非负跟踪id被解释为触点,值-1表示未使用的插槽。以前不存在的跟踪id被认为是新的,不再存在的跟踪标识被认为是已删除的。由于只传播更改,因此每个启动的触点的完整状态必须位于接收端。在接收到MT事件后,只需更新当前时隙的适当属性。
 Some devices identify and/or track more contacts than they can report to the driver.  A driver for such a device should associate one type B slot with each contact that is reported by the hardware.  Whenever the identity of the contact associated with a slot changes, the driver should invalidate that slot by changing its ABS_MT_TRACKING_ID.  If the hardware signals that it is tracking more contacts than it is currently reporting, the driver should use a BTN_TOOL_*TAP event to inform userspace of the total number of contacts being tracked by the hardware at that moment.  The driver should do this by explicitly sending the corresponding BTN_TOOL_*TAP event and setting use_count to false when calling input_mt_report_pointer_emulation(). The driver should only advertise as many slots as the hardware can report. Userspace can detect that a driver can report more total contacts than slots by noting that the largest supported BTN_TOOL_*TAP event is larger than the total number of type B slots reported in the absinfo for the ABS_MT_SLOT axis.
 一些设备识别和/或跟踪的触点数量超过了他们可以向驱动报告的数量。这种设备的驱动程序应该将一个B型插槽与硬件报告的每个触点相关联。每当与插槽关联的触点的身份发生更改时,驱动程序应通过更改其ABS_MT_TRACKING_ID来使该插槽无效。如果硬件发出信号,表明它正在跟踪比当前报告的触点更多的触点,则驱动程序应使用BTN_TOOL_*TAP事件通知用户空间此时硬件正在跟踪的触点总数。驱动程序应该通过显式发送相应的BTN_TOOL_*TAP事件并在调用input_mt_report_pointer_simulation()时将use_count设置为false来完成此操作。驱动程序应该只公布硬件可以报告的插槽数量。用户空间可以通过注意到最大的支持BTN_TOOL_*TAP事件大于ABS_MT_SLOT轴的absinfo中报告的B类插槽的总数,检测到驱动程序可以报告比插槽更多的总触点。
 The minimum value of the ABS_MT_SLOT axis must be 0.
 ABS_MT_SLOT轴的最小值必须为0。

三、Protocol Example A   //协议A举例
 ------------------
 Here is what a minimal event sequence for a two-contact touch would look like for a type A device:
以下是A型设备的双触点触摸的最小事件序列:
   ABS_MT_POSITION_X x[0]
   ABS_MT_POSITION_Y y[0]
   SYN_MT_REPORT
   ABS_MT_POSITION_X x[1]
   ABS_MT_POSITION_Y y[1]
   SYN_MT_REPORT
   SYN_REPORT
 The sequence after moving one of the contacts looks exactly the same; the raw data for all present contacts are sent between every synchronization with SYN_REPORT.
 移动其中一个触点后的顺序看起来完全相同;在每次同步SYN_ REPORT之间发送所有当前触点的原始数据。
 Here is the sequence after lifting the first contact:
以下是抬起第一个触点后的顺序:
   ABS_MT_POSITION_X x[1]
   ABS_MT_POSITION_Y y[1]
   SYN_MT_REPORT
   SYN_REPORT
 And here is the sequence after lifting the second contact:
下面是提起第二个触点后的顺序:
   SYN_MT_REPORT
   SYN_REPORT
 If the driver reports one of BTN_TOUCH or ABS_PRESSURE in addition to the ABS_MT events, the last SYN_MT_REPORT event may be omitted. Otherwise, the last SYN_REPORT will be dropped by the input core, resulting in no zero-contact event reaching userland.
如果驱动除了ABS_MT事件之外还报告BTN_TOUCH或ABS_PRESSURE中的一个,则可以省略最后一个SYN_MT_REPORT事件。否则,最后一个SYN_REPORT将被输入核心丢弃,导致没有零接触事件到达用户区域。


四、Protocol Example B   //协议B举例
 ------------------
 Here is what a minimal event sequence for a two-contact touch would look like for a type B device:
以下是B类设备的双触点触摸的最小事件序列:
   ABS_MT_SLOT 0
   ABS_MT_TRACKING_ID 45
   ABS_MT_POSITION_X x[0]
   ABS_MT_POSITION_Y y[0]
   ABS_MT_SLOT 1
   ABS_MT_TRACKING_ID 46
   ABS_MT_POSITION_X x[1]
   ABS_MT_POSITION_Y y[1]
   SYN_REPORT
 Here is the sequence after moving contact 45 in the x direction:
以下是沿x方向移动触点45后的顺序:
   ABS_MT_SLOT 0
   ABS_MT_POSITION_X x[0]
   SYN_REPORT
 Here is the sequence after lifting the contact in slot 0:
以下是提起插槽0中的触点后的顺序:
   ABS_MT_TRACKING_ID -1
   SYN_REPORT
 The slot being modified is already 0, so the ABS_MT_SLOT is omitted.  The message removes the association of slot 0 with contact 45, thereby destroying contact 45 and freeing slot 0 to be reused for another contact.
 正在修改的插槽已为0,因此省略ABS_MT_slot。该消息移除了槽0与触点45的关联,从而破坏触点45并释放槽0以供另一触点重新使用。
 Finally, here is the sequence after lifting the second contact:
最后,这里是提起第二个触点后的顺序:
   ABS_MT_SLOT 1
   ABS_MT_TRACKING_ID -1
   SYN_REPORT

五、Event Usage   //事件使用情况
 -----------
 A set of ABS_MT events with the desired properties is defined. The events are divided into categories, to allow for partial implementation.  The minimum set consists of ABS_MT_POSITION_X and ABS_MT_POSITION_Y, which allows for multiple contacts to be tracked.  If the device supports it, the ABS_MT_TOUCH_MAJOR and ABS_MT_WIDTH_MAJOR may be used to provide the size of the contact area and approaching tool, respectively.
 定义了一组具有所需属性的ABS_MT事件。这些事件被分为几类,以允许部分实施。最小集合由ABS_MT_POSITION_X和ABS_MT_POSITION_Y组成,允许跟踪多个触点。如果设备支持,则ABS_MT_TOUCH_MAJOR和ABS_MT_WIDTH_MAJO可分别用于提供接触区域的大小和逼近工具。
 The TOUCH and WIDTH parameters have a geometrical interpretation; imagine looking through a window at someone gently holding a finger against the glass.  You will see two regions, one inner region consisting of the part of the finger actually touching the glass, and one outer region formed by the perimeter of the finger. The center of the touching region (a) is ABS_MT_POSITION_X/Y and the center of the approaching finger (b) is ABS_MT_TOOL_X/Y. The touch diameter is ABS_MT_TOUCH_MAJOR and the finger diameter is ABS_MT_WIDTH_MAJOR. Now imagine the person pressing the finger harder against the glass. The touch region will increase, and in general, the ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR, which is always smaller than unity, is related to the contact pressure. For pressure-based devices, ABS_MT_PRESSURE may be used to provide the pressure on the contact area instead. Devices capable of contact hovering can use ABS_MT_DISTANCE to indicate the distance between the contact and the surface.
TOUCH和WIDTH参数具有几何解释;想象一下,透过窗户望着一个手指轻轻地点着玻璃的人。您将看到两个区域,一个内部区域由手指实际接触玻璃的部分组成,另一个外部区域由手指周边形成。触摸区域(a)的中心是ABS_MT_POSITION_X/Y, 接近手指(b)的中心为ABS_MT_TOOL_X/Y。触摸直径为ABS_MT_TOUCH_MAJOR,手指直径为ABS_MT_WIDTH_MAJOR。现在想象一下,有人将手指更用力地按在玻璃上。触摸区域将增加,通常,ABS_MT_TOUCH_MAJOR/ABS_MT_WIDTH_MAJOR之比(始终小于1)与接触压力有关。对于基于压力的装置,ABS_MT_PRESSURE可用于提供接触区域上的压力。能够接触悬停的设备可以使用ABS_MT_DISTANCE来指示接触和表面之间的距离。

      Linux MT                               Win8
         __________                     _______________________
        /          \                   |                       |
       /            \                  |                       |
      /     ____     \                 |                       |
     /     /    \     \                |                       |
     \     \  a  \     \               |       a               |
      \     \____/      \              |                       |
       \                 \             |                       |
        \        b        \            |           b           |
         \                 \           |                       |
          \                 \          |                       |
           \                 \         |                       |
            \                /         |                       |
             \              /          |                       |
              \            /           |                       |
               \__________/            |_______________________|

 In addition to the MAJOR parameters, the oval shape of the touch and finger regions can be described by adding the MINOR parameters, such that MAJOR and MINOR are the major and minor axis of an ellipse. The orientation of the touch ellipse can be described with the ORIENTATION parameter, and the direction of the finger ellipse is given by the vector (a - b).
 除了MAJOR参数之外,可以通过添加MINOR参数来描述触摸和手指区域的椭圆形状,使得MAJOR和MINOR是椭圆的长轴和短轴。触摸椭圆的方向可以用orientation参数描述,手指椭圆的方向由矢量(a-b)给出。
 For type A devices, further specification of the touch shape is possible via ABS_MT_BLOB_ID.
  对于A类设备,可以通过ABS_MT_BLOB_ID进一步指定触摸形状。
 The ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a finger or a pen or something else. Finally, the ABS_MT_TRACKING_ID event may be used to track identified contacts over time [5].
ABS_MT_TOOL_TYPE可用于指定触摸工具是手指还是笔或其他东西。最后,ABS_MT_TRACKING_ID事件可用于跟踪一段时间内识别的连接(事件)[5]。
 In the type B protocol, ABS_MT_TOOL_TYPE and ABS_MT_TRACKING_ID are implicitly handled by input core; drivers should instead call input_mt_report_slot_state().
在类型B协议中,ABS_MT_TOOL_type和ABS_MT_TRACKING_ID由输入核心隐式处理;驱动程序应该改为调用input_mt_report_slot_state()。

六、Event Semantics    //事件语义
 ---------------
6.1 ABS_MT_TOUCH_MAJOR
 The length of the major axis of the contact. The length should be given in surface units. If the surface has an X times Y resolution, the largest possible value of ABS_MT_TOUCH_MAJOR is sqrt(X^2 + Y^2), the diagonal [4].
 触点长轴的长度。长度应以表面单位表示。如果曲面具有X乘以Y的分辨率,ABS_MT_TOUCH_MAJOR的最大可能值为sqrt(X^2+Y^2),即对角线[4]。
6.2 ABS_MT_TOUCH_MINOR
 The length, in surface units, of the minor axis of the contact. If the contact is circular, this event can be omitted [4].
 接触短轴的长度,以表面单位表示。如果接触是圆形的,则可以省略此事件[4]。
6.3 ABS_MT_WIDTH_MAJOR
 The length, in surface units, of the major axis of the approaching tool. This should be understood as the size of the tool itself. The orientation of the contact and the approaching tool are assumed to be the same [4].
 接近工具主轴的长度,以表面单位表示。这应理解为工具本身的大小。假设触点和接近工具的方向相同[4]。
6.4 ABS_MT_WIDTH_MINOR
 The length, in surface units, of the minor axis of the approaching tool. Omit if circular [4].
 接近工具短轴的长度,以表面单位表示。如果是圆形[4],则省略。
 The above four values can be used to derive additional information about the contact. The ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR approximates the notion of pressure. The fingers of the hand and the palm all have different characteristic widths.
 上述四个值可用于导出关于触点的附加信息。ABS_MT_TOUCH_MAJOR/ABS_MT_WIDTH_MAJOR 之比近似于压力的概念。手和手掌的手指都具有不同的特征宽度。
6.5 ABS_MT_PRESSURE
 The pressure, in arbitrary units, on the contact area. May be used instead of TOUCH and WIDTH for pressure-based devices or any device with a spatial signal intensity distribution.
 接触面积上的压力,以任意单位表示。对于基于压力的设备或具有空间信号强度分布的任何设备,可以使用TOUCH和WIDTH来代替TOUCH。
6.6 ABS_MT_DISTANCE
 The distance, in surface units, between the contact and the surface. Zero distance means the contact is touching the surface. A positive number means the contact is hovering above the surface.
 触点和表面之间的距离,以表面单位表示。零距离表示触点接触表面。正数表示触点悬停在表面上方。
6.7 ABS_MT_ORIENTATION
 The orientation of the touching ellipse. The value should describe a signed quarter of a revolution clockwise around the touch center. The signed value range is arbitrary, but zero should be returned for an ellipse aligned with the Y axis of the surface, a negative value when the ellipse is turned to the left, and a positive value when the ellipse is turned to the right. When completely aligned with the X axis, the range max should be returned.
 触摸椭圆的方向。该值应描述围绕触摸中心顺时针旋转的四分之一圈。带符号值范围是任意的,但对于与曲面的Y轴对齐的椭圆,应返回零,当椭圆向左旋转时返回负值,当椭圆向右旋转时返回正值。当与X轴完全对齐时,应返回范围最大值。
 Touch ellipsis are symmetrical by default. For devices capable of true 360 degree orientation, the reported orientation must exceed the range max to indicate more than a quarter of a revolution. For an upside-down finger, range max * 2 should be returned.
 默认情况下,触摸省略号是对称的。对于能够真正360度定向的设备,报告的定向必须超过最大范围,以指示超过四分之一转。对于倒置的手指,应返回范围max*2。
 Orientation can be omitted if the touch area is circular, or if the information is not available in the kernel driver. Partial orientation support is possible if the device can distinguish between the two axis, but not (uniquely) any values in between. In such cases, the range of ABS_MT_ORIENTATION should be [0, 1] [4].
 如果触摸区域是圆形的,或者内核驱动程序中没有信息,则可以省略方向。如果设备可以区分两个轴,但不能(唯一地)区分两个之间的任何值,则可以支持部分定向。在这种情况下,ABS_MT_ORIENTATION的范围应为[0,1][4]。
6.8 ABS_MT_POSITION_X
 The surface X coordinate of the center of the touching ellipse.
 触摸椭圆中心的曲面X坐标。
6.9 ABS_MT_POSITION_Y
 The surface Y coordinate of the center of the touching ellipse.
 接触椭圆中心的曲面Y坐标。
6.10 ABS_MT_TOOL_X
 The surface X coordinate of the center of the approaching tool. Omit if the device cannot distinguish between the intended touch point and the tool itself.
 接近工具中心的表面X坐标。如果设备无法区分预期的触摸点和工具本身,则忽略此项。
6.11 ABS_MT_TOOL_Y
 The surface Y coordinate of the center of the approaching tool. Omit if the device cannot distinguish between the intended touch point and the tool itself.
 接近工具中心的表面Y坐标。如果设备无法区分预期的触摸点和工具本身,则忽略此项。
 The four position values can be used to separate the position of the touch from the position of the tool. If both positions are present, the major tool axis points towards the touch point [1]. Otherwise, the tool axes are aligned with the touch axes.
 四个位置值可用于将触摸位置与工具位置分开。如果两个位置都存在,则主工具轴指向接触点[1]。否则,工具轴与触摸轴对齐。
6.12 ABS_MT_TOOL_TYPE
 The type of approaching tool. A lot of kernel drivers cannot distinguish between different tool types, such as a finger or a pen. In such cases, the event should be omitted. The protocol currently supports MT_TOOL_FINGER, MT_TOOL_PEN, and MT_TOOL_PALM [2]. For type B devices, this event is handled by input core; drivers should instead use input_mt_report_slot_state(). A contact's ABS_MT_TOOL_TYPE may change over time while still touching the device, because the firmware may not be able to determine which tool is being used when it first appears.
 接近工具的类型。许多内核驱动程序无法区分不同的工具类型,例如手指或笔。在这种情况下,应省略该事件。该协议目前支持MT_TOOL_FINGER、MT_TOOL_PEN和MT_TOOL-PALM[2]。对于B类设备,此事件由输入核心处理;驱动程序应该改用input_mt_report_slot_state()。触点的ABS_MT_TOOL_TYPE可能会随着时间的推移而改变,同时仍在触摸设备,因为固件可能无法确定首次出现时使用的工具。
6.13 ABS_MT_BLOB_ID
 The BLOB_ID groups several packets together into one arbitrarily shaped contact. The sequence of points forms a polygon which defines the shape of the contact. This is a low-level anonymous grouping for type A devices, and should not be confused with the high-level trackingID [5]. Most type A devices do not have blob capability, so drivers can safely omit this event.
 BLOB_ID将多个数据包组合成一个任意形状的接触。点序列形成了一个多边形,它定义了接触的形状。这是A类设备的低级匿名分组,不应与高级跟踪ID混淆[5]。大多数A类设备没有blob功能,因此驱动程序可以安全地忽略此事件。
6.14 ABS_MT_TRACKING_ID
 The TRACKING_ID identifies an initiated contact throughout its life cycle [5]. The value range of the TRACKING_ID should be large enough to ensure unique identification of a contact maintained over an extended period of time. For type B devices, this event is handled by input core; drivers should instead use input_mt_report_slot_state().
 TRACKING_ID在其整个生命周期中识别发起的接触[5]。TRACKING_ID的值范围应足够大,以确保在长时间内保持的触点的唯一标识。对于B类设备,此事件由输入核心处理;驱动程序应该改用input_mt_report_slot_state()。

七、Event Computation   //事件计算
 -----------------
 The flora of different hardware unavoidably leads to some devices fitting better to the MT protocol than others. To simplify and unify the mapping, this section gives recipes for how to compute certain events.
 不同硬件的种类不可避免地导致一些设备比其他设备更适合MT协议。为了简化和统一映射,本节给出了如何计算某些事件的方法。
 For devices reporting contacts as rectangular shapes, signed orientation cannot be obtained. Assuming X and Y are the lengths of the sides of the touching rectangle, here is a simple formula that retains the most information possible:
对于报告触点为矩形的设备,无法获得带符号的方向。假设X和Y是触摸矩形边的长度,这里有一个简单的公式,可以保留尽可能多的信息:
   ABS_MT_TOUCH_MAJOR := max(X, Y)
   ABS_MT_TOUCH_MINOR := min(X, Y)
   ABS_MT_ORIENTATION := bool(X > Y)
 The range of ABS_MT_ORIENTATION should be set to [0, 1], to indicate that the device can distinguish between a finger along the Y axis (0) and a finger along the X axis (1).
 ABS_MT_ORIENTATION的范围应设置为[0,1],以指示设备可以区分沿Y轴(0)的手指和沿X轴(1)的手指。
 For win8 devices with both T and C coordinates, the position mapping is
对于同时具有T和C坐标的win8设备,位置映射为
   ABS_MT_POSITION_X := T_X
   ABS_MT_POSITION_Y := T_Y
   ABS_MT_TOOL_X := C_X
   ABS_MT_TOOL_Y := C_Y
 Unfortunately, there is not enough information to specify both the touching ellipse and the tool ellipse, so one has to resort to approximations.  One simple scheme, which is compatible with earlier usage, is:
不幸的是,没有足够的信息来指定触摸椭圆和工具椭圆,因此必须使用近似值。一个与早期用法兼容的简单方案是:
   ABS_MT_TOUCH_MAJOR := min(X, Y)
   ABS_MT_TOUCH_MINOR := <not used>
   ABS_MT_ORIENTATION := <not used>
   ABS_MT_WIDTH_MAJOR := min(X, Y) + distance(T, C)
   ABS_MT_WIDTH_MINOR := min(X, Y)
 Rationale: We have no information about the orientation of the touching ellipse, so approximate it with an inscribed circle instead. The tool ellipse should align with the vector (T - C), so the diameter must increase with distance(T, C). Finally, assume that the touch diameter is equal to the tool thickness, and we arrive at the formulas above.
 理由:我们没有关于接触椭圆方向的信息,所以用内切圆来近似。工具椭圆应与矢量(T-C)对齐,因此直径必须随距离(T,C)增加。最后,假设接触直径等于工具厚度,我们得出上述公式。
 
八、Finger Tracking 
 ---------------
 The process of finger tracking, i.e., to assign a unique trackingID to each initiated contact on the surface, is a Euclidian Bipartite Matching problem.  At each event synchronization, the set of actual contacts is matched to the set of contacts from the previous synchronization. A full implementation can be found in [3].
手指跟踪的过程,即为表面上的每个初始接触分配一个唯一的跟踪ID,是欧几里得二部分匹配问题。在每次事件同步时,实际触点的集合与上一次同步中的触点集合相匹配。完整的实现可以在[3]中找到。
 

九、Gestures 
 --------
 In the specific application of creating gesture events, the TOUCH and WIDTH parameters can be used to, e.g., approximate finger pressure or distinguish between index finger and thumb. With the addition of the MINOR parameters, one can also distinguish between a sweeping finger and a pointing finger, and with ORIENTATION, one can detect twisting of fingers.
在创建手势事件的特定应用中,TOUCH和WIDTH参数可用于例如近似手指压力或区分食指和拇指。通过添加MINOR参数,还可以区分扫指和指向指,通过ORIENTATION,可以检测手指的扭曲。


十、Notes 
 -----
 In order to stay compatible with existing applications, the data reported in a finger packet must not be recognized as single-touch events.
 为了与现有应用程序保持兼容,手指包中报告的数据不能被识别为单次触摸事件。
 For type A devices, all finger data bypasses input filtering, since subsequent events of the same type refer to different fingers.
 对于A类设备,所有手指数据都绕过输入过滤,因为相同类型的后续事件引用不同的手指。
 For example usage of the type A protocol, see the bcm5974 driver. For example usage of the type B protocol, see the hid-egalax driver.
 有关A类协议的用法示例,请参阅bcm5974驱动程序。有关B类协议的用法示例,请参阅hid-egalax驱动程序。
 [1] Also, the difference (TOOL_X - POSITION_X) can be used to model tilt.   此外,差异(TOOL_X-POSITION_X)可用于建模倾斜。
 [2] The list can of course be extended. 
 当然,这个列表可以扩展。
 [3] The mtdev project: http://bitmath.org/code/mtdev/. 
 [4] See the section on event computation.   请参阅事件计算部分。
 [5] See the section on finger tracking.   请参见手指跟踪部分。
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

大智兄

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值