Opened 15 years ago

Closed 8 years ago

Last modified 8 years ago

#4847 closed bug (fixed)

Wacom Intuos not handled

Reported by: Pete Owned by: stippi
Priority: normal Milestone: R1
Component: Drivers Version: R1/alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I found that my (original) Intuos 6x8 USB didn't function properly under Haiku (though it has always worked fine with Stippi et al's code in BeOS). Looking at the source I saw that the pen-contact (Button 1) detection had changed from the earlier code, and no longer matched the Intuos protocol.

While fixing this, I did some reverse engineering, and found out how the Eraser function is signalled. (This was never implemented in the code.)

So I made a patch (attached) that gives my tablet full function. I think it should be compatible with the other models handled by the same code, but of course this needs to be checked.

There are a couple of fiddle-factors that are right for my tablet (contact detection and proximity), but I don't know if there's likely to be any problem with them for others.

Attachments (2)

wacom.diff (2.6 KB ) - added by Pete 15 years ago.
Patch to make Intuos work properly
0001-fix-for-older-Wacom-tablet.patch (2.5 KB ) - added by Pete 10 years ago.
Revised git-format patch

Download all attachments as: .zip

Change History (13)

by Pete, 15 years ago

Attachment: wacom.diff added

Patch to make Intuos work properly

comment:1 by korli, 15 years ago

Component: Add-Ons/Input MethodsDrivers
Owner: changed from korli to stippi

Reassigning to Stippi

comment:2 by mmadia, 14 years ago

patch: 01

comment:3 by Pete, 10 years ago

Is there any chance that somebody could check that this patch doesn't screw up other Wacom tablets, and commit it? I am still having to replace Haiku's driver with this patched one if I want to use my Intuos tablet. (The first button -- pen-tip -- is always "on" without it.) Five years is a long time to wait... (:-/)

comment:4 by korli, 10 years ago

Hi Pete! Sorry I don't own a Wacom tablet so I couldn't check what you ask. What is problematic with this kind of patch is that it is really a hack, which with a bit of luck might not break anything. I don't mean this is a problem specific to your patch, but more a general problem with this driver which doesn't take reports, tools into account, to be able to amend and improve the code logic based on experiment with each tablet model.

That said, the patch can probably be applied, provided code style is corrected, a git-formatted patch would also be nice.

comment:5 by axeld, 10 years ago

There are a number of superfluous comments/commented out code, and coding style issues.

If no one wants to or can test whether this breaks anything for the existing tablets, I guess we'll just have to apply the reworked patch and wait for bug reports.

The comment in line 295 following is way too long, and should be where it is needed. Also, if you put comments in there like "test perhaps superfluous", put a "TODO: " in front of it.

comment:6 by stippi, 10 years ago

Also, just to note: A while ago I reworked the generic HID tablet support a bit, it should in fact support all of the Wacom driver features except the jitter filtering. I don't know why I stopped this work, I think may Wacom may have been too old.

I could test the patch once it is applied, I have a Wacom Intuos 2 here on my desk.

comment:7 by Pete, 10 years ago

Thanks all. I'll see if I can get the patch reworked. (IIRC it actually predates git?)

by Pete, 10 years ago

Revised git-format patch

comment:8 by Pete, 10 years ago

Attached a revised patch. Think/hope it matches the guidelines.

As I reduced some explanatory comments, I'll record the here for reference:

 Modifications to correct (original) Intuos functioning...
 The critical point is that data[6] is used to signal use of the eraser,
 as well as being the high bits of pressure.  The indication is only valid
 when the pen is *not* in contact with the tablet, so it must be retained
 from the pre-touch state while the pen is in contact.
 (Always) while not in contact:
	If the pen end is lowermost data[6] = 1;
	If the eraser end is down data[6] = 0, and pressure is strictly 0
 data[9] (top 5 bits: 0x70..0xd0) indicates height above the tablet;
 this is used to prevent pressure jitter giving false eraser state.

comment:9 by waddlesplash, 10 years ago

@axeld @stippi: can either of you test / review this patch?

comment:10 by pulkomandy, 8 years ago

Resolution: fixed
Status: newclosed

Applied in hrev50553. We'll see if someone complains.

comment:11 by Pete, 8 years ago

Many thanks for finally getting this patched in! Works as it should for me.

Note: See TracTickets for help on using tickets.