diff options
author | Ulf Brosziewski <bru@cvs.openbsd.org> | 2017-07-16 18:30:25 +0000 |
---|---|---|
committer | Ulf Brosziewski <bru@cvs.openbsd.org> | 2017-07-16 18:30:25 +0000 |
commit | f84046f422bb889eba41a0705954f923edc1ab47 (patch) | |
tree | cfaf85ca28690d2d186eb42c1fd2e95bcf25c67b /sys | |
parent | 45d22d0339e5da3a4254d566d113df8c52f33964 (diff) |
Explain the multi-touch tracking function.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/wscons/wsmouse.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/wscons/wsmouse.c b/sys/dev/wscons/wsmouse.c index bb731213673..3c32297a57a 100644 --- a/sys/dev/wscons/wsmouse.c +++ b/sys/dev/wscons/wsmouse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsmouse.c,v 1.39 2017/05/08 20:55:29 bru Exp $ */ +/* $OpenBSD: wsmouse.c,v 1.40 2017/07/16 18:30:24 bru Exp $ */ /* $NetBSD: wsmouse.c,v 1.35 2005/02/27 00:27:52 perry Exp $ */ /* @@ -1183,6 +1183,16 @@ wsmouse_matching(int *matrix, int m, int n, int *buffer) } } +/* + * Assign slot numbers to the points in the pt array, and update all slots by + * calling wsmouse_mtstate internally. The slot numbers are passed to the + * caller in the pt->slot fields. + * + * The slot assignment pairs the points with points of the previous frame in + * such a way that the sum of the squared distances is minimal. Using + * squares instead of simple distances favours assignments with more uniform + * distances, and it is faster. + */ void wsmouse_mtframe(struct device *sc, struct mtpoint *pt, int size) { |