[gpm]Synaptics driver GUI configuration...
Peter Berg Larsen
pebl@math.ku.dk
Tue, 14 May 2002 03:58:10 +0200 (MET DST)
On Mon, 13 May 2002, Laurent PERROTON wrote:
> I have done a little Tcl/Tk GUI to dynamically manage the
> configuration of the parameters of the synaptics touchpad driver. The
> gui communicates with the driver with two pipes (/dev/synaptics and
> /dev/synapticsctl). The GUI is in Tcl/Tk, it gives a real time display
> of the presure of the finger, position on the pad, you can
> interactively set the "edges" definiton, toggle tossing, edge_motion,
> etc, etc...
I have thought about doing this myself for some time, but.. I dont think
that it should in one specific driver. So I would suggest that you move
the connection and communication to gmp.c and add the proper functions in
synaptics. This is a more generel approach and its posible to add more
mouseconfigurations to the gui.
A second reason: I am thinking of splitting the synaptics.c in two; one
generic touchpad and the other specific, and easy add VESA touchpad
support afterwards.
> Also, I have introduced a new algorithm which I find smoother to
> manage the coordinates from the pad and tune the acceleration (I
> originally did the GUI to easier tune the parameters of the algorithm)
First I cant follow your algorithme, and without testing I would say it
has problems. (I know it is not easy to see through every combination of
settings and there is many!. I am also usually lazzy and satisfied when it
works in my prefered setting, but the just last week was a patch for a
clear bug that never fit me because I never used those settings).
So my comments (you asked so you get it):
1) You are using less data to calculate dx,dy.
2) With edge motion on, I seems not to be able to change direction, when
at the edge. I cant change the speed by pressure under edge motion.
3) You cant use negative indexes in last_locs as these a "random" numbers.
You are hacking around this be defining mod4 to val+4%4. This is
epsecially true in some newer code, where adjustment is done to last_locs
to compensate for some jittering and mouse movement.
4) if you need a sign function I would prefere a sign where sign(0)=0.
5) syn_read_ps2_ident is changed.
6) the value w is more than just fingerwidth. so dont just use the value
4. (in the newer code there is option for it)
7) You have a 4 way button and added support. Unfortunatly the protocol is
close to the stick protocol and some care must be take to seperate
theese. This is done in the newer code.
8) Dont assume that the user want to use wmode even if the touchpad is
capable of it.
9) There is no functionallity of finger_up_time. (eventhough I also is
thinking of adding it).
10) is it optimal to communicate with a gui like that (with ascii variable
names and values)?
Peter
--
E-Mail: pebl@math.ku.dk
Real name: Peter Berg Larsen
Where: Department of Computer Science, Copenhagen Uni., Denmark