USB's 2 filter routines were merged in previous commit and
now only a single function exists in wcmFilter.c.  It is also
highly doubtful that any HW needs filter logic different then
wcmFilterCoord().

Removed RawFilter() from WacomDevice structure and call
wcmFilterCoord() directly from wcmCommon.c.

This means ISDV4 devices will now have their samples filtered;
which seems a good idea.

If devices need to disable filtering then the pre-existing
RAW_FILTERING_FLAG is better option then NULL function checks.

Signed-off-by: Chris Bagwell <ch...@cnpbagwell.com>
---

Peter, this is requested patch to call wcmFilterCoord() directly.
Can you please test on ISDV4 device briefly?  I suggest drawing
fast circles with and without patch to see if patch clears up any
stair steps.  Should also make straight lines straigher.  I don't
really have ideas on negative things it could cause to look for.

 src/wcmCommon.c     |    5 ++---
 src/wcmUSB.c        |    2 --
 src/xf86WacomDefs.h |    2 --
 3 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/wcmCommon.c b/src/wcmCommon.c
index 0e9ad6a..48371d9 100644
--- a/src/wcmCommon.c
+++ b/src/wcmCommon.c
@@ -918,14 +918,13 @@ void wcmEvent(WacomCommonPtr common, unsigned int channel,
        }
 
        /* Optionally filter values only while in proximity */
-       if (RAW_FILTERING(common) && common->wcmModel->FilterRaw &&
-           ds.proximity && ds.device_type != PAD_ID)
+       if (RAW_FILTERING(common) && ds.proximity && ds.device_type != PAD_ID)
        {
                /* Start filter fresh when entering proximity */
                if (!pLast->proximity)
                        wcmResetSampleCounter(pChannel);
 
-               common->wcmModel->FilterRaw(common,pChannel,&ds);
+               wcmFilterCoord(common,pChannel,&ds);
        }
 
        /* Discard unwanted data */
diff --git a/src/wcmUSB.c b/src/wcmUSB.c
index 51161f0..089ccc4 100644
--- a/src/wcmUSB.c
+++ b/src/wcmUSB.c
@@ -22,7 +22,6 @@
 #endif
 
 #include "xf86Wacom.h"
-#include "wcmFilter.h"
 
 #include <asm/types.h>
 #include <linux/input.h>
@@ -72,7 +71,6 @@ static struct _WacomModel mname =             \
        .GetRanges = usbWcmGetRanges,           \
        .Start = usbStart,                      \
        .Parse = usbParse,                      \
-       .FilterRaw = wcmFilterCoord,            \
        .DetectConfig = usbDetectConfig,        \
 };
 
diff --git a/src/xf86WacomDefs.h b/src/xf86WacomDefs.h
index 8cdc9e2..41ebb99 100644
--- a/src/xf86WacomDefs.h
+++ b/src/xf86WacomDefs.h
@@ -96,8 +96,6 @@ struct _WacomModel
        int (*GetRanges)(InputInfoPtr pInfo);
        int (*Start)(InputInfoPtr pInfo);
        int (*Parse)(InputInfoPtr pInfo, const unsigned char* data, int len);
-       int (*FilterRaw)(WacomCommonPtr common, WacomChannelPtr pChannel,
-               WacomDeviceStatePtr ds);
        int (*DetectConfig)(InputInfoPtr pInfo);
 };
 
-- 
1.7.3.2


------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to