diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2024-08-24 08:50:34 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2024-09-06 08:56:46 +0300 |
commit | 43a48ec581d7e4b6751b236122f7c0a78c99a838 (patch) | |
tree | 2a6186830ccbf2c56232b4cb116d3e03cb70789d /rust/helpers/task.c | |
parent | 83b6549ee18885c1ac74ae91a7e406e7ed33b5c8 (diff) | |
download | linux-43a48ec581d7e4b6751b236122f7c0a78c99a838.tar.xz |
Input: zforce_ts - make parsing of contacts less confusing
Zforce touch data packet consists of a byte representing number of
contacts followed by several chunks with length of 9 bytes representing
each contact. Instead of accounting for the leading byte by increasing
offset of each field in contacts by one introduce a pointer to contact
data and point it appropriately. This avoids awkward constructs like:
point.prblty = payload[9 * i + 9];
which makes it seem like there is off-by-one error, in favor of more
straightforward:
point.prblty = p[8];
Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-11-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'rust/helpers/task.c')
0 files changed, 0 insertions, 0 deletions