summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--acinclude.m42
-rw-r--r--configure.in14
-rw-r--r--src/2.4.22/wacom.c6
-rw-r--r--src/2.4.30x86-64/wacom.c6
-rw-r--r--src/2.4/wacom.c6
-rw-r--r--src/2.6.10/wacom.c8
-rwxr-xr-xsrc/2.6.11/wacom_sys.c2
-rwxr-xr-xsrc/2.6.13/wacom_sys.c2
-rwxr-xr-xsrc/2.6.15/wacom_sys.c2
-rw-r--r--src/2.6.16/wacom_sys.c2
-rw-r--r--src/2.6.16/wacom_wac.c4
-rwxr-xr-xsrc/2.6.19/wacom_sys.c2
-rwxr-xr-xsrc/2.6.19/wacom_wac.c4
-rw-r--r--src/2.6.8/wacom.c8
-rw-r--r--src/2.6.9/wacom.c8
-rwxr-xr-xsrc/include/Xwacom.h17
-rwxr-xr-xsrc/util/xsetwacom.c77
-rwxr-xr-xsrc/xdrv/wcmCommon.c65
-rwxr-xr-xsrc/xdrv/wcmConfig.c2
-rwxr-xr-xsrc/xdrv/wcmFilter.c74
-rw-r--r--src/xdrv/wcmXCommand.c13
-rwxr-xr-xsrc/xdrv/xf86Wacom.c5
-rwxr-xr-xsrc/xdrv/xf86Wacom.h12
24 files changed, 177 insertions, 169 deletions
diff --git a/ChangeLog b/ChangeLog
index 4d713fa..b2be282 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-14 Ping Cheng <pingc@wacom.com>
+ * Added RawSample option to xsetwacom
+ * Reset old data after each out-prox event
+ * Change Bamboo ring from strip to absolute wheel
+
2007-06-05 Ping Cheng <pingc@wacom.com>
* Updated xsetwacom suppress option
* Merged Ron's building and configuration patches
diff --git a/acinclude.m4 b/acinclude.m4
index 6a82706..0052ea4 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -58,7 +58,7 @@ WCM_XLIBDIR_DEFAULT2=/usr/lib
if test "$WCM_OPTION_XSERVER64" = "yes"; then
CFLAGS="$CFLAGS -D__amd64__"
WCM_XSERVER64="-D_XSERVER64"
- test `$WCM_ARCH | grep -c "x86_64"` == 0 || WCM_KSTACK="-mpreferred-stack-boundary=4 -mcmodel=kernel"
+ test `echo $WCM_ARCH | grep -c "x86_64"` == 0 || WCM_KSTACK="-mpreferred-stack-boundary=4 -mcmodel=kernel"
WCM_XLIBDIR_DEFAULT=/usr/X11R6/lib64
if test -d /usr/lib64; then
WCM_XLIBDIR_DEFAULT2=/usr/lib64
diff --git a/configure.in b/configure.in
index d01a2e1..4ed2abb 100644
--- a/configure.in
+++ b/configure.in
@@ -336,14 +336,12 @@ AC_HELP_STRING([--with-xmoduledir], [Specify wacom_drv path explicitly. Implies
[
WCM_MODDIR="$withval"
])
-if test -n $WCM_MODDIR; then
+if test -n "$WCM_MODDIR"; then
WCM_OPTION_DLLOADER=yes
-else
- if test -d $WCM_XLIBDIR/xorg/modules/input; then
- WCM_MODDIR=$WCM_XLIBDIR/xorg/modules/input
- elif test -d $WCM_XLIBDIR/modules/input; then
- WCM_MODDIR=$WCM_XLIBDIR/modules/input
- fi
+elif test -d $WCM_XLIBDIR/xorg/modules/input; then
+ WCM_MODDIR=$WCM_XLIBDIR/xorg/modules/input
+elif test -d $WCM_XLIBDIR/modules/input; then
+ WCM_MODDIR=$WCM_XLIBDIR/modules/input
fi
dnl Check for dlloader
@@ -354,7 +352,7 @@ AC_HELP_STRING([--enable-dlloader], [Use dlloader [[default=usually]]]),
if test "$enable_dlloader" = "yes"; then
WCM_OPTION_DLLOADER=yes
else
- WCM_OPTION_DLLOADER=no
+ WCM_OPTION_DLLOADER=no
fi
#usual case
if test x$enable_dlloader == x"" && test $WCM_OPTION_DLLOADER != "yes"; then
diff --git a/src/2.4.22/wacom.c b/src/2.4.22/wacom.c
index 31e5178..40a64b6 100644
--- a/src/2.4.22/wacom.c
+++ b/src/2.4.22/wacom.c
@@ -467,7 +467,7 @@ static void wacom_graphire_irq(struct urb *urb)
input_report_key(dev, BTN_1, (data[7] & 0x20));
input_report_key(dev, BTN_4, (data[7] & 0x10));
input_report_key(dev, BTN_5, (data[7] & 0x40));
- input_report_abs(dev, ABS_RX, (data[8] & 0x7f));
+ input_report_abs(dev, ABS_WHEEL, (data[8] & 0x7f));
input_report_key(dev, BTN_TOOL_FINGER, 0xf0);
input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID);
input_event(dev, EV_MSC, MSC_SERIAL, 0xf0);
@@ -477,7 +477,7 @@ static void wacom_graphire_irq(struct urb *urb)
input_report_key(dev, BTN_1, (data[7] & 0x20));
input_report_key(dev, BTN_4, (data[7] & 0x10));
input_report_key(dev, BTN_5, (data[7] & 0x40));
- input_report_abs(dev, ABS_RX, (data[8] & 0x7f));
+ input_report_abs(dev, ABS_WHEEL, (data[8] & 0x7f));
input_report_key(dev, BTN_TOOL_FINGER, 0);
input_report_abs(dev, ABS_MISC, 0);
input_event(dev, EV_MSC, MSC_SERIAL, 0xf0);
@@ -779,7 +779,7 @@ static void wacom_intuos_irq(struct urb *urb)
#define WACOM_G4_TOOLS (BIT(BTN_TOOL_FINGER))
#define WACOM_G4_BUTTONS (BIT(BTN_0) | BIT(BTN_4))
#define WACOM_MO_BUTTONS (WACOM_G4_BUTTONS | BIT(BTN_1) | BIT(BTN_5))
-#define WACOM_MO_ABS (BIT(ABS_RX))
+#define WACOM_MO_ABS (BIT(ABS_WHEEL))
#define WACOM_INTUOS_TOOLS (BIT(BTN_TOOL_BRUSH) | BIT(BTN_TOOL_PENCIL) | BIT(BTN_TOOL_AIRBRUSH) | BIT(BTN_TOOL_LENS))
#define WACOM_INTUOS3_TOOLS (WACOM_INTUOS_TOOLS | BIT(BTN_TOOL_FINGER))
#define WACOM_INTUOS_BUTTONS (BIT(BTN_SIDE) | BIT(BTN_EXTRA))
diff --git a/src/2.4.30x86-64/wacom.c b/src/2.4.30x86-64/wacom.c
index 3e4b5bd..bbd9bf3 100644
--- a/src/2.4.30x86-64/wacom.c
+++ b/src/2.4.30x86-64/wacom.c
@@ -411,7 +411,7 @@ static void wacom_graphire_irq(struct urb *urb)
input_report_key(dev, BTN_1, (data[7] & 0x20));
input_report_key(dev, BTN_4, (data[7] & 0x10));
input_report_key(dev, BTN_5, (data[7] & 0x40));
- input_report_abs(dev, ABS_RX, (data[8] & 0x7f));
+ input_report_abs(dev, ABS_WHEEL, (data[8] & 0x7f));
input_report_key(dev, BTN_TOOL_FINGER, 0xf0);
input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID);
input_event(dev, EV_MSC, MSC_SERIAL, 0xf0);
@@ -421,7 +421,7 @@ static void wacom_graphire_irq(struct urb *urb)
input_report_key(dev, BTN_1, (data[7] & 0x20));
input_report_key(dev, BTN_4, (data[7] & 0x10));
input_report_key(dev, BTN_5, (data[7] & 0x40));
- input_report_abs(dev, ABS_RX, (data[8] & 0x7f));
+ input_report_abs(dev, ABS_WHEEL, (data[8] & 0x7f));
input_report_key(dev, BTN_TOOL_FINGER, 0);
input_report_abs(dev, ABS_MISC, 0);
input_event(dev, EV_MSC, MSC_SERIAL, 0xf0);
@@ -722,7 +722,7 @@ static void wacom_intuos_irq(struct urb *urb)
#define WACOM_G4_TOOLS (BIT(BTN_TOOL_FINGER))
#define WACOM_G4_BUTTONS (BIT(BTN_0) | BIT(BTN_4))
#define WACOM_MO_BUTTONS (WACOM_G4_BUTTONS | BIT(BTN_1) | BIT(BTN_5))
-#define WACOM_MO_ABS (BIT(ABS_RX))
+#define WACOM_MO_ABS (BIT(ABS_WHEEL))
#define WACOM_INTUOS_TOOLS (BIT(BTN_TOOL_BRUSH) | BIT(BTN_TOOL_PENCIL) | BIT(BTN_TOOL_AIRBRUSH) | BIT(BTN_TOOL_LENS))
#define WACOM_INTUOS3_TOOLS (WACOM_INTUOS_TOOLS | BIT(BTN_TOOL_FINGER))
#define WACOM_INTUOS_BUTTONS (BIT(BTN_SIDE) | BIT(BTN_EXTRA))
diff --git a/src/2.4/wacom.c b/src/2.4/wacom.c
index 34ce19e..01e8214 100644
--- a/src/2.4/wacom.c
+++ b/src/2.4/wacom.c
@@ -466,7 +466,7 @@ static void wacom_graphire_irq(struct urb *urb)
input_report_key(dev, BTN_1, (data[7] & 0x20));
input_report_key(dev, BTN_4, (data[7] & 0x10));
input_report_key(dev, BTN_5, (data[7] & 0x40));
- input_report_abs(dev, ABS_RX, (data[8] & 0x7f));
+ input_report_abs(dev, ABS_WHEEL, (data[8] & 0x7f));
input_report_key(dev, BTN_TOOL_FINGER, 0xf0);
input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID);
input_event(dev, EV_MSC, MSC_SERIAL, 0xf0);
@@ -476,7 +476,7 @@ static void wacom_graphire_irq(struct urb *urb)
input_report_key(dev, BTN_1, (data[7] & 0x20));
input_report_key(dev, BTN_4, (data[7] & 0x10));
input_report_key(dev, BTN_5, (data[7] & 0x40));
- input_report_abs(dev, ABS_RX, (data[8] & 0x7f));
+ input_report_abs(dev, ABS_WHEEL, (data[8] & 0x7f));
input_report_key(dev, BTN_TOOL_FINGER, 0);
input_report_abs(dev, ABS_MISC, 0);
input_event(dev, EV_MSC, MSC_SERIAL, 0xf0);
@@ -779,7 +779,7 @@ static void wacom_intuos_irq(struct urb *urb)
#define WACOM_G4_TOOLS (BIT(BTN_TOOL_FINGER))
#define WACOM_G4_BUTTONS (BIT(BTN_0) | BIT(BTN_4))
#define WACOM_MO_BUTTONS (WACOM_G4_BUTTONS | BIT(BTN_1) | BIT(BTN_5))
-#define WACOM_MO_ABS (BIT(ABS_RX))
+#define WACOM_MO_ABS (BIT(ABS_WHEEL))
#define WACOM_INTUOS_TOOLS (BIT(BTN_TOOL_BRUSH) | BIT(BTN_TOOL_PENCIL) | BIT(BTN_TOOL_AIRBRUSH) | BIT(BTN_TOOL_LENS))
#define WACOM_INTUOS3_TOOLS (WACOM_INTUOS_TOOLS | BIT(BTN_TOOL_FINGER))
#define WACOM_INTUOS_BUTTONS (BIT(BTN_SIDE) | BIT(BTN_EXTRA))
diff --git a/src/2.6.10/wacom.c b/src/2.6.10/wacom.c
index 3d429f2..37f257e 100644
--- a/src/2.6.10/wacom.c
+++ b/src/2.6.10/wacom.c
@@ -516,7 +516,7 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs)
input_report_key(dev, BTN_1, (data[7] & 0x20));
input_report_key(dev, BTN_4, (data[7] & 0x10));
input_report_key(dev, BTN_5, (data[7] & 0x40));
- input_report_abs(dev, ABS_RX, (data[8] & 0x7f));
+ input_report_abs(dev, ABS_WHEEL, (data[8] & 0x7f));
input_report_key(dev, BTN_TOOL_FINGER, 0xf0);
input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID);
input_event(dev, EV_MSC, MSC_SERIAL, 0xf0);
@@ -526,7 +526,7 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs)
input_report_key(dev, BTN_1, (data[7] & 0x20));
input_report_key(dev, BTN_4, (data[7] & 0x10));
input_report_key(dev, BTN_5, (data[7] & 0x40));
- input_report_abs(dev, ABS_RX, (data[8] & 0x7f));
+ input_report_abs(dev, ABS_WHEEL, (data[8] & 0x7f));
input_report_key(dev, BTN_TOOL_FINGER, 0);
input_report_abs(dev, ABS_MISC, 0);
input_event(dev, EV_MSC, MSC_SERIAL, 0xf0);
@@ -999,8 +999,8 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
switch (wacom->features->type) {
case MO:
wacom->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5);
- wacom->dev.absbit[0] |= BIT(ABS_RX);
- wacom->dev.absmax[ABS_RX] = 71;
+ wacom->dev.absbit[0] |= BIT(ABS_WHEEL);
+ wacom->dev.absmax[ABS_WHEEL] = 71;
case G4:
wacom->dev.evbit[0] |= BIT(EV_MSC);
diff --git a/src/2.6.11/wacom_sys.c b/src/2.6.11/wacom_sys.c
index 647a16f..5bcf90e 100755
--- a/src/2.6.11/wacom_sys.c
+++ b/src/2.6.11/wacom_sys.c
@@ -154,7 +154,7 @@ static void wacom_close(struct input_dev *dev)
void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5);
- input_set_abs_params(input_dev, ABS_RX, 0, 71, 0, 0);
+ input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
}
void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
diff --git a/src/2.6.13/wacom_sys.c b/src/2.6.13/wacom_sys.c
index b72d673..f6a8210 100755
--- a/src/2.6.13/wacom_sys.c
+++ b/src/2.6.13/wacom_sys.c
@@ -154,7 +154,7 @@ static void wacom_close(struct input_dev *dev)
void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5);
- input_set_abs_params(input_dev, ABS_RX, 0, 71, 0, 0);
+ input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
}
void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
diff --git a/src/2.6.15/wacom_sys.c b/src/2.6.15/wacom_sys.c
index 640742b..8fc1147 100755
--- a/src/2.6.15/wacom_sys.c
+++ b/src/2.6.15/wacom_sys.c
@@ -148,7 +148,7 @@ static void wacom_close(struct input_dev *dev)
void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5);
- input_set_abs_params(input_dev, ABS_RX, 0, 71, 0, 0);
+ input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
}
void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
diff --git a/src/2.6.16/wacom_sys.c b/src/2.6.16/wacom_sys.c
index 2aeb797..83d5339 100644
--- a/src/2.6.16/wacom_sys.c
+++ b/src/2.6.16/wacom_sys.c
@@ -148,7 +148,7 @@ static void wacom_close(struct input_dev *dev)
void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5);
- input_set_abs_params(input_dev, ABS_RX, 0, 71, 0, 0);
+ input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
}
void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
diff --git a/src/2.6.16/wacom_wac.c b/src/2.6.16/wacom_wac.c
index 77c50f9..afca5a5 100644
--- a/src/2.6.16/wacom_wac.c
+++ b/src/2.6.16/wacom_wac.c
@@ -267,7 +267,7 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo)
wacom_report_key(wcombo, BTN_1, (data[7] & 0x20));
wacom_report_key(wcombo, BTN_4, (data[7] & 0x10));
wacom_report_key(wcombo, BTN_5, (data[7] & 0x40));
- wacom_report_abs(wcombo, ABS_RX, (data[8] & 0x7f));
+ wacom_report_abs(wcombo, ABS_WHEEL, (data[8] & 0x7f));
wacom_report_key(wcombo, BTN_TOOL_FINGER, 0xf0);
wacom_report_abs(wcombo, ABS_MISC, PAD_DEVICE_ID);
wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, 0xf0);
@@ -278,7 +278,7 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo)
wacom_report_key(wcombo, BTN_1, (data[7] & 0x20));
wacom_report_key(wcombo, BTN_4, (data[7] & 0x10));
wacom_report_key(wcombo, BTN_5, (data[7] & 0x40));
- wacom_report_abs(wcombo, ABS_RX, (data[8] & 0x7f));
+ wacom_report_abs(wcombo, ABS_WHEEL, (data[8] & 0x7f));
wacom_report_key(wcombo, BTN_TOOL_FINGER, 0);
wacom_report_abs(wcombo, ABS_MISC, 0);
wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, 0xf0);
diff --git a/src/2.6.19/wacom_sys.c b/src/2.6.19/wacom_sys.c
index 5227934..1104ac1 100755
--- a/src/2.6.19/wacom_sys.c
+++ b/src/2.6.19/wacom_sys.c
@@ -141,7 +141,7 @@ static void wacom_close(struct input_dev *dev)
void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5);
- input_set_abs_params(input_dev, ABS_RX, 0, 71, 0, 0);
+ input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
}
void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
diff --git a/src/2.6.19/wacom_wac.c b/src/2.6.19/wacom_wac.c
index 351c259..31179cd 100755
--- a/src/2.6.19/wacom_wac.c
+++ b/src/2.6.19/wacom_wac.c
@@ -260,7 +260,7 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo)
wacom_report_key(wcombo, BTN_1, (data[7] & 0x20));
wacom_report_key(wcombo, BTN_4, (data[7] & 0x10));
wacom_report_key(wcombo, BTN_5, (data[7] & 0x40));
- wacom_report_abs(wcombo, ABS_RX, (data[8] & 0x7f));
+ wacom_report_abs(wcombo, ABS_WHEEL, (data[8] & 0x7f));
wacom_report_key(wcombo, BTN_TOOL_FINGER, 0xf0);
wacom_report_abs(wcombo, ABS_MISC, PAD_DEVICE_ID);
wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, 0xf0);
@@ -271,7 +271,7 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo)
wacom_report_key(wcombo, BTN_1, (data[7] & 0x20));
wacom_report_key(wcombo, BTN_4, (data[7] & 0x10));
wacom_report_key(wcombo, BTN_5, (data[7] & 0x40));
- wacom_report_abs(wcombo, ABS_RX, (data[8] & 0x7f));
+ wacom_report_abs(wcombo, ABS_WHEEL, (data[8] & 0x7f));
wacom_report_key(wcombo, BTN_TOOL_FINGER, 0);
wacom_report_abs(wcombo, ABS_MISC, 0);
wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, 0xf0);
diff --git a/src/2.6.8/wacom.c b/src/2.6.8/wacom.c
index f935e96..586453f 100644
--- a/src/2.6.8/wacom.c
+++ b/src/2.6.8/wacom.c
@@ -515,7 +515,7 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs)
input_report_key(dev, BTN_1, (data[7] & 0x20));
input_report_key(dev, BTN_4, (data[7] & 0x10));
input_report_key(dev, BTN_5, (data[7] & 0x40));
- input_report_abs(dev, ABS_RX, (data[8] & 0x7f));
+ input_report_abs(dev, ABS_WHEEL, (data[8] & 0x7f));
input_report_key(dev, BTN_TOOL_FINGER, 0xf0);
input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID);
input_event(dev, EV_MSC, MSC_SERIAL, 0xf0);
@@ -525,7 +525,7 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs)
input_report_key(dev, BTN_1, (data[7] & 0x20));
input_report_key(dev, BTN_4, (data[7] & 0x10));
input_report_key(dev, BTN_5, (data[7] & 0x40));
- input_report_abs(dev, ABS_RX, (data[8] & 0x7f));
+ input_report_abs(dev, ABS_WHEEL, (data[8] & 0x7f));
input_report_key(dev, BTN_TOOL_FINGER, 0);
input_report_abs(dev, ABS_MISC, 0);
input_event(dev, EV_MSC, MSC_SERIAL, 0xf0);
@@ -998,8 +998,8 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
switch (wacom->features->type) {
case MO:
wacom->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5);
- wacom->dev.absbit[0] |= BIT(ABS_RX);
- wacom->dev.absmax[ABS_RX] = 71;
+ wacom->dev.absbit[0] |= BIT(ABS_WHEEL);
+ wacom->dev.absmax[ABS_WHEEL] = 71;
case G4:
wacom->dev.evbit[0] |= BIT(EV_MSC);
wacom->dev.mscbit[0] |= BIT(MSC_SERIAL);
diff --git a/src/2.6.9/wacom.c b/src/2.6.9/wacom.c
index 3e82c46..6841066 100644
--- a/src/2.6.9/wacom.c
+++ b/src/2.6.9/wacom.c
@@ -515,7 +515,7 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs)
input_report_key(dev, BTN_1, (data[7] & 0x20));
input_report_key(dev, BTN_4, (data[7] & 0x10));
input_report_key(dev, BTN_5, (data[7] & 0x40));
- input_report_abs(dev, ABS_RX, (data[8] & 0x7f));
+ input_report_abs(dev, ABS_WHEEL, (data[8] & 0x7f));
input_report_key(dev, BTN_TOOL_FINGER, 0xf0);
input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID);
input_event(dev, EV_MSC, MSC_SERIAL, 0xf0);
@@ -525,7 +525,7 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs)
input_report_key(dev, BTN_1, (data[7] & 0x20));
input_report_key(dev, BTN_4, (data[7] & 0x10));
input_report_key(dev, BTN_5, (data[7] & 0x40));
- input_report_abs(dev, ABS_RX, (data[8] & 0x7f));
+ input_report_abs(dev, ABS_WHEEL, (data[8] & 0x7f));
input_report_key(dev, BTN_TOOL_FINGER, 0);
input_report_abs(dev, ABS_MISC, 0);
input_event(dev, EV_MSC, MSC_SERIAL, 0xf0);
@@ -998,8 +998,8 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
switch (wacom->features->type) {
case MO:
wacom->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5);
- wacom->dev.absbit[0] |= BIT(ABS_RX);
- wacom->dev.absmax[ABS_RX] = 71;
+ wacom->dev.absbit[0] |= BIT(ABS_WHEEL);
+ wacom->dev.absmax[ABS_WHEEL] = 71;
case G4:
wacom->dev.evbit[0] |= BIT(EV_MSC);
wacom->dev.mscbit[0] |= BIT(MSC_SERIAL);
diff --git a/src/include/Xwacom.h b/src/include/Xwacom.h
index bdb0e7c..eb747b6 100755
--- a/src/include/Xwacom.h
+++ b/src/include/Xwacom.h
@@ -39,6 +39,7 @@
#define XWACOM_PARAM_SUPPRESS 12
#define XWACOM_PARAM_SCREEN_NO 13
#define XWACOM_PARAM_COMMONDBG 14
+#define XWACOM_PARAM_RAWSAMPLE 15
/* The followings are defined together */
#define XWACOM_PARAM_BUTTON1 101
@@ -114,14 +115,16 @@
#define XWACOM_PARAM_SBOTTOMX2 361
#define XWACOM_PARAM_SBOTTOMY2 362
-#define XWACOM_VALUE_TV_NONE 0
-#define XWACOM_VALUE_TV_ABOVE_BELOW 1
-#define XWACOM_VALUE_TV_LEFT_RIGHT 2
+#define TV_NONE 0
+#define TV_ABOVE_BELOW 1
+#define TV_LEFT_RIGHT 2
-#define XWACOM_VALUE_ROTATE_NONE 0
-#define XWACOM_VALUE_ROTATE_CW 1
-#define XWACOM_VALUE_ROTATE_CCW 2
-#define XWACOM_VALUE_ROTATE_HALF 3
+#define ROTATE_NONE 0
+#define ROTATE_CW 1
+#define ROTATE_CCW 2
+#define ROTATE_HALF 3
+
+#define XWACOM_MAX_SAMPLES 20
/* The following flags are used for XWACOM_PARAM_BUTTON# values to mark
* the type of event that should be emitted when that button is pressed;
diff --git a/src/util/xsetwacom.c b/src/util/xsetwacom.c
index 7d2e908..7602623 100755
--- a/src/util/xsetwacom.c
+++ b/src/util/xsetwacom.c
@@ -183,111 +183,111 @@ static PARAMINFO gParamInfo[] =
XWACOM_PARAM_BUTTON10, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 10 },
- {"Button11",
+ { "Button11",
"X11 event to which button 11 should be mapped. ",
XWACOM_PARAM_BUTTON11, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 11 },
- {"Button12",
+ { "Button12",
"X11 event to which button 12 should be mapped. ",
XWACOM_PARAM_BUTTON12, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 12 },
- {"Button13",
+ { "Button13",
"X11 event to which button 13 should be mapped. ",
XWACOM_PARAM_BUTTON13, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 13 },
- {"Button14",
+ { "Button14",
"X11 event to which button 14 should be mapped. ",
XWACOM_PARAM_BUTTON14, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 14 },
- {"Button15",
+ { "Button15",
"X11 event to which button 15 should be mapped. ",
XWACOM_PARAM_BUTTON15, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 15 },
- {"Button16",
+ { "Button16",
"X11 event to which button 16 should be mapped. ",
XWACOM_PARAM_BUTTON16, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 16 },
- {"Button17",
+ { "Button17",
"X11 event to which button 17 should be mapped. ",
XWACOM_PARAM_BUTTON17, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 17 },
- {"Button18",
+ { "Button18",
"X11 event to which button 18 should be mapped. ",
XWACOM_PARAM_BUTTON18, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 18 },
- {"Button19",
+ { "Button19",
"X11 event to which button 19 should be mapped. ",
XWACOM_PARAM_BUTTON19, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 19 },
- {"Button20",
+ { "Button20",
"X11 event to which button 20 should be mapped. ",
XWACOM_PARAM_BUTTON20, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 20 },
- {"Button21",
+ { "Button21",
"X11 event to which button 21 should be mapped. ",
XWACOM_PARAM_BUTTON21, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 21 },
- {"Button22",
+ { "Button22",
"X11 event to which button 22 should be mapped. ",
XWACOM_PARAM_BUTTON22, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 22 },
- {"Button23",
+ { "Button23",
"X11 event to which button 23 should be mapped. ",
XWACOM_PARAM_BUTTON23, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 23 },
- {"Button24",
+ { "Button24",
"X11 event to which button 24 should be mapped. ",
XWACOM_PARAM_BUTTON24, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 24 },
- {"Button25",
+ { "Button25",
"X11 event to which button 25 should be mapped. ",
XWACOM_PARAM_BUTTON25, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 25 },
- {"Button26",
+ { "Button26",
"X11 event to which button 26 should be mapped. ",
XWACOM_PARAM_BUTTON26, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 26 },
- {"Button27",
+ { "Button27",
"X11 event to which button 27 should be mapped. ",
XWACOM_PARAM_BUTTON27, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 27 },
- {"Button28",
+ { "Button28",
"X11 event to which button 28 should be mapped. ",
XWACOM_PARAM_BUTTON28, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 28 },
- {"Button29",
+ { "Button29",
"X11 event to which button 29 should be mapped. ",
XWACOM_PARAM_BUTTON29, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 29 },
- {"Button30",
+ { "Button30",
"X11 event to which button 30 should be mapped. ",
XWACOM_PARAM_BUTTON30, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 30 },
- {"Button31",
+ { "Button31",
"X11 event to which button 31 should be mapped. ",
XWACOM_PARAM_BUTTON31, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 31 },
- {"Button32",
+ { "Button32",
"X11 event to which button 32 should be mapped. ",
XWACOM_PARAM_BUTTON32, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 32 },
@@ -309,6 +309,12 @@ static PARAMINFO gParamInfo[] =
XWACOM_PARAM_SUPPRESS, VALUE_OPTIONAL, RANGE,
0, 100, SINGLE_VALUE, 2 },
+ { "RawSample",
+ "Number of raw data used to filter the points, "
+ "default is 4. ",
+ XWACOM_PARAM_RAWSAMPLE, VALUE_OPTIONAL, RANGE,
+ 1, XWACOM_MAX_SAMPLES, SINGLE_VALUE, 4 },
+
{ "Screen_No",
"Sets/gets screen number the tablet is mapped to, "
"default is -1. ",
@@ -324,8 +330,7 @@ static PARAMINFO gParamInfo[] =
"Sets the mapping to TwinView horizontal/vertical/none. "
"Values = none, vertical, horizontal (default is none).",
XWACOM_PARAM_TWINVIEW, VALUE_OPTIONAL, RANGE,
- XWACOM_VALUE_TV_NONE, XWACOM_VALUE_TV_LEFT_RIGHT,
- SINGLE_VALUE, XWACOM_VALUE_TV_NONE },
+ TV_NONE, TV_LEFT_RIGHT, SINGLE_VALUE, TV_NONE },
{ "Mode",
"Switches cursor movement mode (default is absolute). ",
@@ -350,47 +355,45 @@ static PARAMINFO gParamInfo[] =
{ "Rotate",
"Sets the rotation of the tablet. "
"Values = NONE, CW, CCW, HALF (default is NONE).",
- XWACOM_PARAM_ROTATE, VALUE_OPTIONAL,
- RANGE, XWACOM_VALUE_ROTATE_NONE,
- XWACOM_VALUE_ROTATE_HALF, SINGLE_VALUE,
- XWACOM_VALUE_ROTATE_NONE },
+ XWACOM_PARAM_ROTATE, VALUE_OPTIONAL, RANGE,
+ ROTATE_NONE, ROTATE_HALF, SINGLE_VALUE, ROTATE_NONE },
- {"RelWUp",
+ { "RelWUp",
"X11 event to which relative wheel up should be mapped. ",
XWACOM_PARAM_RELWUP, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 4 },
- {"RelWDn",
+ { "RelWDn",
"X11 event to which relative wheel down should be mapped. ",
XWACOM_PARAM_RELWDN, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 5 },
-/* {"AbsWUp",
+ { "AbsWUp",
"X11 event to which absolute wheel up should be mapped. ",
XWACOM_PARAM_ABSWUP, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 4 },
- {"AbsWDn",
+ { "AbsWDn",
"X11 event to which absolute wheel down should be mapped. ",
XWACOM_PARAM_ABSWDN, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 5 },
-*/
- {"StripLUp",
+
+ { "StripLUp",
"X11 event to which left strip up should be mapped. ",
XWACOM_PARAM_STRIPLUP, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 4 },
- {"StripLDn",
+ { "StripLDn",
"X11 event to which left strip down should be mapped. ",
XWACOM_PARAM_STRIPLDN, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 5 },
- {"StripRUp",
+ { "StripRUp",
"X11 event to which right strip up should be mapped. ",
XWACOM_PARAM_STRIPRUP, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 4 },
- {"StripRDn",
+ { "StripRDn",
"X11 event to which right strip down should be mapped. ",
XWACOM_PARAM_STRIPRDN, VALUE_OPTIONAL, 0, 0, 0,
ACTION_VALUE, 5 },
diff --git a/src/xdrv/wcmCommon.c b/src/xdrv/wcmCommon.c
index 445b0cd..22fc8cd 100755
--- a/src/xdrv/wcmCommon.c
+++ b/src/xdrv/wcmCommon.c
@@ -544,7 +544,7 @@ static void sendWheelStripEvents(LocalDevicePtr local, const WacomDeviceState* d
DBG(10, priv->debugLevel, ErrorF("sendWheelStripEvents for %s \n", local->name));
- /* simulate events for relative wheel */
+ /* emulate events for relative wheel */
if ( ds->relwheel )
{
value = ds->relwheel;
@@ -560,8 +560,8 @@ static void sendWheelStripEvents(LocalDevicePtr local, const WacomDeviceState* d
}
}
- /* simulate events for absolute wheel when needed */
-/* if ( ds->abswheel != priv->oldWheel )
+ /* emulate events for absolute wheel when needed */
+ if ( ds->abswheel != priv->oldWheel )
{
value = priv->oldWheel - ds->abswheel;
if ( value > 0 )
@@ -575,8 +575,8 @@ static void sendWheelStripEvents(LocalDevicePtr local, const WacomDeviceState* d
keyP = priv->wdnk;
}
}
-*/
- /* simulate events for left strip */
+
+ /* emulate events for left strip */
if ( ds->stripx != priv->oldStripX )
{
int temp = 0, n;
@@ -596,14 +596,14 @@ static void sendWheelStripEvents(LocalDevicePtr local, const WacomDeviceState* d
fakeButton = priv->striplup;
keyP = priv->slupk;
}
- else
+ else if ( value < 0 )
{
fakeButton = priv->stripldn;
keyP = priv->sldnk;
}
}
- /* simulate events for right strip */
+ /* emulate events for right strip */
if ( ds->stripy != priv->oldStripY )
{
int temp = 0, n;
@@ -623,7 +623,7 @@ static void sendWheelStripEvents(LocalDevicePtr local, const WacomDeviceState* d
fakeButton = priv->striprup;
keyP = priv->srupk;
}
- else
+ else if ( value < 0 )
{
fakeButton = priv->striprdn;
keyP = priv->srdnk;
@@ -701,8 +701,8 @@ static void sendCommonEvents(LocalDevicePtr local, const WacomDeviceState* ds, i
if (priv->oldButtons != buttons)
xf86WcmSendButtons(local,buttons,x,y,z,v3,v4,v5);
- /* simulate wheel/strip events when defined */
- if ( ds->relwheel ||
+ /* emulate wheel/strip events when defined */
+ if ( ds->relwheel || ds->abswheel ||
( (ds->stripx - priv->oldStripX) && ds->stripx && priv->oldStripX) ||
((ds->stripy - priv->oldStripY) && ds->stripy && priv->oldStripY) )
sendWheelStripEvents(local, ds, x, y, z, v3, v4, v5);
@@ -813,19 +813,26 @@ void xf86WcmSendEvents(LocalDevicePtr local, const WacomDeviceState* ds)
y = priv->topY;
priv->currentX = x;
priv->currentY = y;
+
+ /* update the old records */
+ if(!priv->oldProximity)
+ {
+ priv->oldWheel = wheel;
+ priv->oldX = priv->currentX;
+ priv->oldY = priv->currentY;
+ priv->oldZ = z;
+ priv->oldTiltX = tx;
+ priv->oldTiltY = ty;
+ priv->oldStripX = ds->stripx;
+ priv->oldStripY = ds->stripy;
+ priv->oldRot = rot;
+ priv->oldThrottle = throttle;
+ }
if (!is_absolute)
{
- if(!priv->oldProximity)
- {
- /* don't move the cursor */
- x = 0;
- y = 0;
- }
- else
- {
- x -= priv->oldX;
- y -= priv->oldY;
- }
+ x -= priv->oldX;
+ y -= priv->oldY;
+
/* don't apply speed for fairly small increments */
no_jitter = (priv->speed*3 > 4) ? priv->speed*3 : 4;
relacc = (MAX_ACCEL-priv->accel)*(MAX_ACCEL-priv->accel);
@@ -894,15 +901,15 @@ void xf86WcmSendEvents(LocalDevicePtr local, const WacomDeviceState* ds)
}
else
{
- if (v3 || v4 || buttons || ds->relwheel)
+ if (v3 || v4 || v5 || buttons || ds->relwheel)
{
x = 0;
y = 0;
- if ( v3 || v4 )
+ if ( v3 || v4 || v5 )
xf86WcmSetScreen(local, &x, &y);
sendCommonEvents(local, ds, x, y, z, v3, v4, v5);
is_proximity = 1;
- if ( v3 || v4 )
+ if ( v3 || v4 || v5 )
{
xf86PostMotionEvent(local->dev, is_absolute,
0, naxes, x, y, z, v3, v4, v5);
@@ -1111,7 +1118,7 @@ void xf86WcmEvent(WacomCommonPtr common, unsigned int channel,
{
DBG(11, common->debugLevel, ErrorF("initialize Channel data.\n"));
/* store channel device state for later use */
- for (i=MAX_SAMPLES - 1; i>=0; i--)
+ for (i=common->wcmRawSample - 1; i>=0; i--)
{
fs->x[i]= ds.x;
fs->y[i]= ds.y;
@@ -1121,7 +1128,7 @@ void xf86WcmEvent(WacomCommonPtr common, unsigned int channel,
++fs->npoints;
} else {
/* Filter raw data, fix hardware defects, perform error correction */
- for (i=MAX_SAMPLES - 1; i>0; i--)
+ for (i=common->wcmRawSample - 1; i>0; i--)
{
fs->x[i]= fs->x[i-1];
fs->y[i]= fs->y[i-1];
@@ -1130,7 +1137,7 @@ void xf86WcmEvent(WacomCommonPtr common, unsigned int channel,
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--)
+ for (i=common->wcmRawSample - 1; i>0; i--)
{
fs->tiltx[i]= fs->tiltx[i-1];
fs->tilty[i]= fs->tilty[i-1];
@@ -1167,9 +1174,9 @@ void xf86WcmEvent(WacomCommonPtr common, unsigned int channel,
/* save channel device state and device to which last event went */
memmove(pChannel->valid.states + 1,
pChannel->valid.states,
- sizeof(WacomDeviceState) * (MAX_SAMPLES - 1));
+ sizeof(WacomDeviceState) * (common->wcmRawSample - 1));
pChannel->valid.state = ds; /*save last raw sample */
- if (pChannel->nSamples < MAX_SAMPLES) ++pChannel->nSamples;
+ if (pChannel->nSamples < common->wcmRawSample) ++pChannel->nSamples;
commonDispatchDevice(common,channel,pChannel, suppress);
resetSampleCounter(pChannel);
diff --git a/src/xdrv/wcmConfig.c b/src/xdrv/wcmConfig.c
index 5bd6ef9..fbe15cf 100755
--- a/src/xdrv/wcmConfig.c
+++ b/src/xdrv/wcmConfig.c
@@ -208,6 +208,8 @@ LocalDevicePtr xf86WcmAllocate(char* name, int flag)
/* default to Graphire */
common->wcmSuppress = DEFAULT_SUPPRESS;
/* transmit position if increment is superior */
+ common->wcmRawSample = DEFAULT_SAMPLES;
+ /* number of raw data to be used to for filtering */
/* tool */
priv->tool = tool;
diff --git a/src/xdrv/wcmFilter.c b/src/xdrv/wcmFilter.c
index 0a05d6d..131b87f 100755
--- a/src/xdrv/wcmFilter.c
+++ b/src/xdrv/wcmFilter.c
@@ -24,9 +24,7 @@ static void filterCurveToLine(int* pCurve, int nMax, double x0, double y0,
static int filterOnLine(double x0, double y0, double x1, double y1,
double a, double b);
static void filterLine(int* pCurve, int nMax, int x0, int y0, int x1, int y1);
-static void filterIntuosStylus(WacomFilterStatePtr state, WacomDeviceStatePtr ds);
-static void filterIntuosCoord(int* state, int* current);
-static void filterIntuosTilt(int* state, int* tilt);
+static void filterIntuosStylus(WacomCommonPtr common, WacomFilterStatePtr state, WacomDeviceStatePtr ds);
/*****************************************************************************
* xf86WcmSetPressureCurve -- apply user-defined curve to pressure values
@@ -201,49 +199,31 @@ static void filterLine(int* pCurve, int nMax, int x0, int y0, int x1, int y1)
* but also cuts down quite a bit on jitter.
****************************************************************************/
-static void filterIntuosStylus(WacomFilterStatePtr state, WacomDeviceStatePtr ds)
+static void filterIntuosStylus(WacomCommonPtr common, WacomFilterStatePtr state, WacomDeviceStatePtr ds)
{
- /* filter x */
- filterIntuosCoord(state->x, &ds->x);
- /* filter y */
- filterIntuosCoord(state->y, &ds->y);
- /* filter tiltx */
- filterIntuosTilt(state->tiltx, &ds->tiltx);
- /* filter tilty */
- filterIntuosTilt(state->tilty, &ds->tilty);
-}
-
-static void filterIntuosCoord(int* state, int* current)
-{
- int x=0, i;
-
- for ( i=0; i<MAX_SAMPLES; i++ )
- x += state[i];
+ int x=0, y=0, tx=0, ty=0, i;
- *current = x / MAX_SAMPLES;
-}
-
-/*****************************************************************************
- * filterIntuosTilt --
- * Correct some hardware defects we've been seeing in Intuos pads,
- * but also cuts down quite a bit on jitter.
- ****************************************************************************/
-
-static void filterIntuosTilt(int* state, int* tilt)
-{
- int i;
-
- *tilt = 0;
- for ( i=0; i<MAX_SAMPLES; i++ )
+ for ( i=0; i<common->wcmRawSample; i++ )
{
- *tilt += state[i];
+ x += state->x[i];
+ y += state->y[i];
+ tx += state->tiltx[i];
+ ty += state->tilty[i];
}
- *tilt /= MAX_SAMPLES;
-
- if (*tilt > 63)
- *tilt = 63;
- else if (*tilt < -64)
- *tilt = -64;
+ ds->x = x / common->wcmRawSample;
+ ds->y = y / common->wcmRawSample;
+
+ ds->tiltx = tx / common->wcmRawSample;
+ if (ds->tiltx > 63)
+ ds->tiltx = 63;
+ else if (ds->tiltx < -64)
+ ds->tiltx = -64;
+
+ ds->tilty = ty / common->wcmRawSample;
+ if (ds->tilty > 63)
+ ds->tilty = 63;
+ else if (ds->tilty < -64)
+ ds->tilty = -64;
}
/*****************************************************************************
@@ -259,7 +239,7 @@ int xf86WcmFilterCoord(WacomCommonPtr common, WacomChannelPtr pChannel,
WacomDeviceState *pLast;
int *x, *y, i;
- DBG(10, common->debugLevel, ErrorF("xf86WcmFilterCoord with " "MAX_SAMPLES = %d \n", MAX_SAMPLES));
+ DBG(10, common->debugLevel, ErrorF("xf86WcmFilterCoord with " "common->wcmRawSample = %d \n", common->wcmRawSample));
x = pChannel->rawFilter.x;
y = pChannel->rawFilter.y;
@@ -267,13 +247,13 @@ int xf86WcmFilterCoord(WacomCommonPtr common, WacomChannelPtr pChannel,
ds->x = 0;
ds->y = 0;
- for ( i=0; i<MAX_SAMPLES; i++ )
+ for ( i=0; i<common->wcmRawSample; i++ )
{
ds->x += x[i];
ds->y += y[i];
}
- ds->x /= MAX_SAMPLES;
- ds->y /= MAX_SAMPLES;
+ ds->x /= common->wcmRawSample;
+ ds->y /= common->wcmRawSample;
return 0; /* lookin' good */
}
@@ -289,7 +269,7 @@ int xf86WcmFilterIntuos(WacomCommonPtr common, WacomChannelPtr pChannel,
* cannot be fixed, return 1 such that the data is discarded. */
if (ds->device_type != CURSOR_ID)
- filterIntuosStylus(&pChannel->rawFilter, ds);
+ filterIntuosStylus(common, &pChannel->rawFilter, ds);
else
xf86WcmFilterCoord(common, pChannel, ds);
diff --git a/src/xdrv/wcmXCommand.c b/src/xdrv/wcmXCommand.c
index 67c9241..e6e36a9 100644
--- a/src/xdrv/wcmXCommand.c
+++ b/src/xdrv/wcmXCommand.c
@@ -175,6 +175,13 @@ static int xf86WcmSetParam(LocalDevicePtr local, int param, int value)
common->wcmSuppress = value;
}
break;
+ case XWACOM_PARAM_RAWSAMPLE:
+ if ((value < 1) || (value > XWACOM_MAX_SAMPLES)) return BadValue;
+ if (common->wcmRawSample != value)
+ {
+ common->wcmRawSample = value;
+ }
+ break;
case XWACOM_PARAM_RAWFILTER:
if ((value < 0) || (value > 1)) return BadValue;
if (value)
@@ -741,6 +748,8 @@ static int xf86WcmGetParam(LocalDevicePtr local, int param)
return common->wcmSuppress;
case XWACOM_PARAM_RAWFILTER:
return (common->wcmFlags & RAW_FILTERING_FLAG) ? 1 : 0;
+ case XWACOM_PARAM_RAWSAMPLE:
+ return common->wcmRawSample;
case XWACOM_PARAM_PRESSCURVE:
if (!IsCursor (priv) && !IsPad (priv))
return (priv->nPressCtrl [0] << 24) |
@@ -940,6 +949,10 @@ static int xf86WcmGetDefaultParam(LocalDevicePtr local, int param)
if (!IsCursor (priv) && !IsPad (priv))
return (0 << 24) | (0 << 16) | (100 << 8) | 100;
return -1;
+ case XWACOM_PARAM_SUPPRESS:
+ return DEFAULT_SUPPRESS;
+ case XWACOM_PARAM_RAWSAMPLE:
+ return DEFAULT_SAMPLES;
case XWACOM_PARAM_CURSORPROX:
if (IsCursor (priv))
return common->wcmCursorProxoutDistDefault;
diff --git a/src/xdrv/xf86Wacom.c b/src/xdrv/xf86Wacom.c
index c35d303..a15ff18 100755
--- a/src/xdrv/xf86Wacom.c
+++ b/src/xdrv/xf86Wacom.c
@@ -62,9 +62,10 @@
* 2007-05-01 47-pc0.7.7-9 - fixed 2 bugs
* 2007-05-18 47-pc0.7.7-10 - support new xsetwacom commands
* 2007-06-05 47-pc0.7.7-11 - Test Ron's patches
+ * 2007-06-15 47-pc0.7.7-12 - enable changing number of raw data
*/
-static const char identification[] = "$Identification: 47-0.7.7-11 $";
+static const char identification[] = "$Identification: 47-0.7.7-12 $";
/****************************************************************************/
@@ -554,6 +555,8 @@ static int xf86WcmRegisterX11Devices (LocalDevicePtr local)
if (strstr(common->wcmModel->name, "Intuos3") && IsStylus(priv))
/* Intuos3 Marker Pen rotation */
InitValuatorAxisStruct(local->dev, 5, -900, 899, 1, 1, 1);
+ else if (strstr(common->wcmModel->name, "Bamboo") && IsPad(priv))
+ InitValuatorAxisStruct(local->dev, 5, 0, 71, 1, 1, 1);
else
{
/* absolute wheel */
diff --git a/src/xdrv/xf86Wacom.h b/src/xdrv/xf86Wacom.h
index dbbc584..001a532 100755
--- a/src/xdrv/xf86Wacom.h
+++ b/src/xdrv/xf86Wacom.h
@@ -345,7 +345,8 @@ struct _WacomDeviceRec
* WacomDeviceState
*****************************************************************************/
-#define MAX_SAMPLES 4
+#define MAX_SAMPLES 20
+#define DEFAULT_SAMPLES 4
#define PEN(ds) ((((ds)->device_id) & 0x07ff) == 0x0022 || \
(((ds)->device_id) & 0x07ff) == 0x0042 || \
@@ -454,14 +455,6 @@ struct _WacomDeviceClass
#define DEVICE_ISDV4 0x000C
-#define TV_NONE XWACOM_VALUE_TV_NONE
-#define TV_ABOVE_BELOW XWACOM_VALUE_TV_ABOVE_BELOW
-#define TV_LEFT_RIGHT XWACOM_VALUE_TV_LEFT_RIGHT
-#define ROTATE_NONE XWACOM_VALUE_ROTATE_NONE
-#define ROTATE_CW XWACOM_VALUE_ROTATE_CW
-#define ROTATE_CCW XWACOM_VALUE_ROTATE_CCW
-#define ROTATE_HALF XWACOM_VALUE_ROTATE_HALF
-
#define MAX_CHANNELS 2
struct _WacomCommonRec
@@ -518,6 +511,7 @@ struct _WacomCommonRec
int wcmCursorProxoutDist; /* Max mouse distance for proxy-out max/256 units */
int wcmCursorProxoutDistDefault; /* Default max mouse distance for proxy-out */
int wcmSuppress; /* transmit position on delta > supress */
+ int wcmRawSample; /* Number of raw data used to filter an event */
int bufpos; /* position with buffer */
unsigned char buffer[BUFFER_SIZE]; /* data read from device */