From: "Henrik Rydberg" <rydberg@euromail.se>
To: Daniel Kurtz <djkurtz@chromium.org>
Cc: chase.douglas@canonical.com, dmitry.torokhov@gmail.com,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
olofj@chromium.org, chris@cnpbagwell.com
Subject: Re: [PATCH 6/8 v3] Input: synaptics - process finger (<=3) transitions
Date: Fri, 12 Aug 2011 23:52:53 +0200 [thread overview]
Message-ID: <20110812215253.GB9124@polaris.bitmath.org> (raw)
In-Reply-To: <1313169407-4358-7-git-send-email-djkurtz@chromium.org>
Hi Daniel,
> Synaptics image sensor touchpads track 5 fingers, but only report 2.
> This patch attempts to deal with some idiosyncrasies of these
> touchpads:
I appreciate the complexity of the protocol at hand, and the patch is
doing an excellent job documenting it. However, it does constitute a
fair deal of code... What about the statements below:
1. When two subsequent sgm packets report the same number of fingers
(and unless told otherwise in some other fashion?), the sgm and the
previous agm contains data for the same fingers as the previous (agm,
sgm) pair, i.e., there is no transition.
2. There is no general way to know which fingers are being reported
after a transition.
If both points above are true, how about something like this:
a) Always report slots zero and one (for two or more fingers)
b) Keep a global number, trackid
c) Parse are buffer agm
d) Parse sgm
e) If a transition occured, increase trackid by two
f) Set TRACKING_ID to trackid in slot zero and trackid+1 in slot one.
It seems to me the above will result in contiuous handling of two
unknown contacts in between transitions, and during transitions, new
contacts will be generated.
The algorithm above could possibly be improved for the 2->1
transition, but from what I gather, 1->2 and 2->3 as well as 3->2 does
not seem to be generally solvable, hence resulting in the above
anyways.
If any of points 1 and 2 are wrong, I am sure you will
enlighten/remind me. ;-)
Cheers,
Henrik
next prev parent reply other threads:[~2011-08-12 21:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-12 17:16 [PATCH 0/8 v3] Synaptics image sensor support Daniel Kurtz
2011-08-12 17:16 ` [PATCH 1/8 v3] Input: synaptics - refactor y inversion Daniel Kurtz
2011-08-12 17:16 ` [PATCH 2/8 v3] Input: synaptics - refactor agm packet parsing Daniel Kurtz
2011-08-12 17:16 ` [PATCH 3/8 v3] Input: synaptics - refactor initialization of abs position axes Daniel Kurtz
2011-08-12 17:16 ` [PATCH 4/8 v3] Input: synaptics - add image sensor support Daniel Kurtz
2011-08-12 21:09 ` Henrik Rydberg
2011-08-15 7:17 ` Daniel Kurtz
2011-08-17 14:05 ` Daniel Kurtz
2011-08-17 16:32 ` Dmitry Torokhov
2011-08-17 16:47 ` Daniel Kurtz
[not found] ` <CAGS+omAR1uxS_RA=axmWzwZUgkhZEW+9W8Zk=LHPtALqA990+w@mail.gmail.com>
2011-08-17 17:34 ` Dmitry Torokhov
2011-08-12 17:16 ` [PATCH 5/8 v3] Input: synaptics - decode AGM packet types Daniel Kurtz
2011-08-12 17:16 ` [PATCH 6/8 v3] Input: synaptics - process finger (<=3) transitions Daniel Kurtz
2011-08-12 21:52 ` Henrik Rydberg [this message]
2011-08-15 7:46 ` Daniel Kurtz
2011-08-12 17:16 ` [PATCH 7/8 v3] Input: add BTN_TOOL_QUINTTAP for reporting 5 fingers on touchpad Daniel Kurtz
2011-08-12 17:16 ` [PATCH 8/8 v3] Input: synaptics - process finger (<=5) transitions Daniel Kurtz
2011-08-16 17:41 ` [PATCH 0/8 v3] Synaptics image sensor support Chase Douglas
2011-08-16 22:20 ` Chase Douglas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110812215253.GB9124@polaris.bitmath.org \
--to=rydberg@euromail.se \
--cc=chase.douglas@canonical.com \
--cc=chris@cnpbagwell.com \
--cc=djkurtz@chromium.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olofj@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).