Messages in this thread | | | Date | Mon, 26 Jan 2015 11:56:02 -0500 | Subject | Re: [PATCH] Input: MT - Add support for balanced slot assignment | From | Benjamin Tissoires <> |
| |
On Thu, Jan 22, 2015 at 2:52 PM, Henrik Rydberg <rydberg@bitmath.org> wrote: > Some devices are not fast enough to differentiate between a > fast-moving contact and a new contact. This problem cannot be fully > resolved because information is truly missing, but it is possible > to safe-guard against obvious mistakes by restricting movement with > a maximum displacement. > > The new problem formulation for dmax > 0 cannot benefit from the > speedup for positive definite matrices, but since the convergence is > faster, the result is about the same. For a handful of contacts, the > latency difference is truly negligible. > > Suggested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> > Not-yet-signed-off-by: Henrik Rydberg <rydberg@bitmath.org> > --- > Hi Dmitry, Benjamin, > > This patch incorporates the notion of a speed limit in the slot > assignment function, without changing the behavior for existing code. > > There are multi-touch movement cases where the difference between this > algorithm and a simple deassign-overspeeding-contacts algorithm which > warrants this approach. One example is when a whole array of contacts > are moved one step to the right in one frame. With the simple > algorithm, all contacts will be deassigned, whereas with this > algorithm, the leftmost contact is deassigned and a new contact > created on the right. This is the interpretation of smallest change, > and is consistent with the behavior one would get from two contacts, > for both algorithms. > > I have tested this on a number of testcases in my tree, and I am > running the patch with a speed limit on my device as I write this. If > this patch solves Benjamin's problem, I think we are ok. >
Tested this morning, and yes, it solves the problem. I assumed that the dmax was in mm, and used "10 * priv->x_res", which seemed to do the trick: - tapping with two fingers side by side triggered the jumps - in the general case (switching from the index to the thumb to click), the jumps disappeared.
Maybe we should also add a doc telling which units the dmax should be.
When you'll sign this, you can add my tested-by.
Cheers, Benjamin
| |