[gpm]synaptics bugfix speed_factor (was: Re: New Synaptic patch)

Tuukka Toivonen tuukkat@ees2.oulu.fi
Mon, 8 Apr 2002 12:03:49 +0300 (EEST)


On Sun, 7 Apr 2002, Peter Berg Larsen wrote:

>I have added edge definition options to the config file.

Great!

>I have added some 4-way button code. Turn off stick_enable and turn on

I'll try that, althought I don't have any use for the fourth button. Maybe
it could be defined to run some external command or script?

>touchpad sometimes sends reset ack and id code after a disable stream
>command, and I do not understand at all why. Could someone test whether
>their touchpad also do that?

I'm not sure how to test that. I may find it out and test sometimes next
week (too busy this week).

Anyway, I found a bug from the synaptics driver, which caused the mouse
moving to the opposite direction when the finger is at an edge. This
happens when the finger pressure is between low_pressure and
speed_up_pressure (but by default they are the same, so the bug doesn't
show). Here's the fix:

--- synaptics.c.orig    Fri Apr  5 22:42:36 2002
+++ synaptics.c Fri Apr  5 22:43:28 2002
@@ -588,7 +588,7 @@
       /* compute the speed factor based on pressure */
       speed_factor = standard_speed_factor;

-      if (report.pressure > low_pressure) {
+      if (report.pressure > speed_up_pressure) {
        speed_factor *= 1.0 + ((report.pressure - speed_up_pressure) *
                               pressure_factor);
       }