The changes in wcmCommon.c are either syntax change (casting fs to a point) or wrong (ABS(dsOrig->rotation - dsNew->rotation) > suppress and (1800 - ABS(dsNew->rotation - dsOrig->rotation)) > suppress can never be true the same time).  So, I don't see a reason to apply them.
 
The only real change that affects suppress is the one in xf86Wacom.h:
 
+#define MAX_SUPPRESS 20          /* max value of suppress */

From our experience on other platforms (Windows, Mac...), a suppress value larger than 6 will reduce the data accuracy that causes other issues.  This is why we didn't let anyone to use a suppress larger than 6.  And, I think, this is why some people feel suppress doesn't work since they tried a value larger than 6.
 
Anyway, I've changed 6 to 20 as the patch suggested.  But, I recommend that a suppress larger than 6 will not be used unless you either know what you are doing or you will not complain about losing too much data :).
 
Ping
 
On 9/14/06, Ron <[EMAIL PROTECTED]> wrote:

Hi Antoine, Ping, All,

I'm cc'ing the linux-wacom list for attention and comment:
Is this already fixed in the 0.7.5-2 release, or is it news?

best,
Ron


On Sun, Sep 10, 2006 at 03:37:07PM -0700, Antoine Labour wrote:
> It looks like currently, (as of version 0.7.4.1-4), the
> filtering/suppress code in wacom-tools (in particular the xorg input
> driver) doesn't work at all (for various reasons). Please find in
> attachment a patch that fixes at least some of the problems.
>
> Thanks,
> Antoine

> diff -ur wacom-tools-0.7.4.1 /linuxwacom/src/wcmCommon.c wacom-tools-0.7.4.1-new/linuxwacom/src/wcmCommon.c
> --- wacom-tools-0.7.4.1/linuxwacom/src/wcmCommon.c    2006-03-13 17:17:41.000000000 -0800
> +++ wacom-tools-0.7.4.1-new/linuxwacom/src/wcmCommon.c        2006-09-10 14:59: 56.000000000 -0700
> @@ -667,7 +667,7 @@
>       if (ABS(dsOrig->pressure - dsNew->pressure) > suppress) return 0;
>       if (ABS(dsOrig->throttle - dsNew->throttle) > suppress) return 0;
>
> -     if (ABS(dsOrig->rotation - dsNew->rotation) > suppress ||
> +     if (ABS(dsOrig->rotation - dsNew->rotation) > suppress &&
>               (1800 - ABS(dsNew->rotation - dsOrig->rotation)) > suppress)
>               return 0;
>
> @@ -738,7 +738,7 @@
>       WacomDeviceState* pLast;
>       WacomDeviceState ds;
>       WacomChannelPtr pChannel;
> -     WacomFilterState fs;
> +     WacomFilterState *fs;
>       int i;
>
>       /* tool on the tablet when driver starts */
> @@ -783,35 +783,35 @@
>               return; /* discard */
>       }
>  #endif
> -     fs = pChannel->rawFilter;
> -     if (!fs.npoints && ds.proximity)
> +     fs = &pChannel->rawFilter;
> +     if (!fs->npoints && ds.proximity)
>       {
>               DBG(11, ErrorF("initialize Channel data.\n"));
>               /* store channel device state for later use */
>               for (i=MAX_SAMPLES - 1; i>=0; i--)
>               {
> -                     fs.x[i]= ds.x;
> -                     fs.y[i]= ds.y;
> +                     fs->x[i]= ds.x;
> +                     fs->y[i]= ds.y;
>               }
> -             ++fs.npoints;
> +             ++fs->npoints;
>       } else  {
>               /* Filter raw data, fix hardware defects, perform error correction */
>               for (i=MAX_SAMPLES - 1; i>0; i--)
>               {
> -                     fs.x[i]= fs.x[i-1];
> -                     fs.y[i]= fs.y[i-1];
> +                     fs->x[i]= fs->x[i-1];
> +                     fs->y[i]= fs->y[i-1];
>               }
> -             fs.x[0] = ds.x;
> -             fs.y[0] = ds.y;
> +             fs->x[0] = ds.x;
> +             fs->y[0] = ds.y;
>               if (HANDLE_TILT(common) && (ds.device_type == STYLUS_ID || ds.device_type == ERASER_ID))
>               {
>                       for (i=MAX_SAMPLES - 1; i>0; i--)
>                       {
> -                             fs.tiltx[i]= fs.tiltx[i-1];
> -                             fs.tilty[i]= fs.tilty[i-1];
> +                             fs->tiltx[i]= fs->tiltx[i-1];
> +                             fs->tilty[i]= fs->tilty[i-1];
>                       }
> -                     fs.tiltx[0] = ds.tiltx;
> -                     fs.tilty[0] = ds.tilty;
> +                     fs->tiltx[0] = ds.tiltx;
> +                     fs->tilty[0] = ds.tilty;
>               }
>               if (RAW_FILTERING(common) && common->wcmModel->FilterRaw)
>               {
> diff -ur wacom-tools-0.7.4.1/linuxwacom/src/xf86Wacom.h wacom-tools-0.7.4.1-new /linuxwacom/src/xf86Wacom.h
> --- wacom-tools-0.7.4.1/linuxwacom/src/xf86Wacom.h    2006-05-05 10:25:01.000000000 -0700
> +++ wacom-tools-0.7.4.1-new/linuxwacom/src/xf86Wacom.h        2006-09-10 15:03:42.000000000 -0700
> @@ -115,7 +115,7 @@
>  #define DEFAULT_SPEED 1.0       /* default relative cursor speed */
>  #define MAX_ACCEL 7             /* number of acceleration levels */
>  #define DEFAULT_SUPPRESS 2      /* default suppress */
> -#define MAX_SUPPRESS 6          /* max value of suppress */
> +#define MAX_SUPPRESS 20          /* max value of suppress */
>  #define BUFFER_SIZE 256         /* size of reception buffer */
>  #define XI_STYLUS "STYLUS"      /* X device name for the stylus */
>  #define XI_CURSOR "CURSOR"      /* X device name for the cursor */
> @@ -341,10 +341,10 @@
>  struct _WacomFilterState
>  {
>          int npoints;
> -        int x[3];
> -        int y[3];
> -        int tiltx[3];
> -        int tilty[3];
> +        int x[MAX_SAMPLES];
> +        int y[MAX_SAMPLES];
> +        int tiltx[MAX_SAMPLES];
> +        int tilty[MAX_SAMPLES];
>          int statex;
>          int statey;
>  };
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Linuxwacom-discuss mailing list
Linuxwacom-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss

Reply via email to