digimend-devel Mailing List for DIGImend (Page 28)
Brought to you by:
spb_nick
You can subscribe to this list here.
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(8) |
Jun
(27) |
Jul
(54) |
Aug
(54) |
Sep
(13) |
Oct
(20) |
Nov
(7) |
Dec
(4) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2013 |
Jan
(3) |
Feb
(3) |
Mar
(6) |
Apr
(1) |
May
(8) |
Jun
(5) |
Jul
(4) |
Aug
(10) |
Sep
(44) |
Oct
(12) |
Nov
(5) |
Dec
(14) |
| 2014 |
Jan
(16) |
Feb
(3) |
Mar
(3) |
Apr
(5) |
May
(2) |
Jun
(14) |
Jul
(38) |
Aug
(15) |
Sep
(15) |
Oct
(12) |
Nov
(38) |
Dec
(31) |
| 2015 |
Jan
(73) |
Feb
(71) |
Mar
(57) |
Apr
(36) |
May
(33) |
Jun
(20) |
Jul
(4) |
Aug
(5) |
Sep
(1) |
Oct
(11) |
Nov
(2) |
Dec
(6) |
| 2016 |
Jan
(7) |
Feb
(3) |
Mar
(6) |
Apr
(2) |
May
(7) |
Jun
(5) |
Jul
(3) |
Aug
(5) |
Sep
(5) |
Oct
(8) |
Nov
(13) |
Dec
|
|
From: Luis J. F. E. <sle...@gm...> - 2012-10-18 01:37:54
|
Bus 003 Device 016: ID 5543:0782 UC-Logic Technology Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x5543 UC-Logic Technology Corp.
idProduct 0x0782
bcdDevice 0.00
iManufacturer 1
iProduct 2 H850S
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 59
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 300mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 2 Mouse
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 254
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 5
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 2 Mouse
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 139
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
Device Status: 0x0000
(Bus Powered) |
|
From: minhsien0330 <min...@gm...> - 2012-10-12 22:56:11
|
Bus 002 Device 002: ID 172f:005a Waltop International Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x172f Waltop International Corp.
idProduct 0x005a
bcdDevice 1.03
iManufacturer 1 WALTOP
iProduct 2 Tablet
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 172
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 4
Device Status: 0x0000
(Bus Powered) |
|
From: KSJ <ks...@ra...> - 2012-10-12 20:20:14
|
Hi DIGImend I send you the result of my tablet diagnostics with the hope of a development of a driver. My pen tablet is a Zeniq PT-1001, but when I type "lsusb" in the terminal it says Zippy Technology Corp, og when i type "xinput list" it is called "Digi Tablet". (some has gotten the same tablet with the name Leogics PT-1001). Many regard from Kenny Jensen Denmark |
|
From: Mark C. <mar...@ou...> - 2012-10-09 14:29:13
|
No direct difficulties; I'm just getting started now. Sorry for the delay, I had some plumbing and electrical problems that required my immediate attention. I have been working my way through the HID specs, and I'm now getting started on deciphering the protocol. I may get back to you later today with questions. Thanks,Mark Coelho > Date: Sat, 6 Oct 2012 18:54:40 +0300 > Subject: Re: [DIGImend-devel] Huion 580 tablet diagnostics > From: sp...@gm... > To: mar...@ou... > CC: dig...@li... > > Hi Mark, > > On Sun, Sep 23, 2012 at 11:07 PM, Nikolai Kondrashov <sp...@gm...> wrote: > > Otherwise, I could be able to do this remotely, but it would take time and > > extra effort. > > > > If you have any questions, don't hesitate to contact me. > > Did you encounter any difficulties? Do you need help? > Just ask. I addition to e-mail, you can also use Google Talk to reach me. > > Good luck! > > Sincerely, > Nick |
|
From: SourceForge.net <no...@so...> - 2012-10-08 04:43:21
|
Bugs item #3530731, was opened at 2012-05-29 22:13 Message generated for change (Comment added) made by viktoria-s You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1089171&aid=3530731&group_id=233297 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: tablets Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Viktoria S. (viktoria-s) Assigned to: Viktoria S. (viktoria-s) Summary: GIMP 2.8 device handling issue with multi input devices Initial Comment: On the Configure Input Devices dialog you can see and configure only one of the devices. (For example in case of Genius MousePen i608X you can see the pen or the mouse dependig on which is the first in the xinput list.) The reported bug is here: https://bugzilla.gnome.org/show_bug.cgi?id=674253 ---------------------------------------------------------------------- Comment By: Viktoria S. (viktoria-s) Date: 2012-10-07 21:43 Message: An update: The bug moved to product: gtk+, component: GdkDevice, Version: 3.6.x. With the following comments: --- Comment #1 from Michael Natterer <mi...@gi...> 2012-10-07 19:05:29 UTC --- We only know the device's name, th public GDK API has no concept of ad device "ID". Distinguishing different devices with identical names can only be done inside GDK, and somehow reported via piblic API. Moving to GTK+. ---------------------------------------------------------------------- Comment By: Nikolai Kondrashov (spb_nick) Date: 2012-06-04 14:02 Message: This could also be solved by resolving this bug: https://sourceforge.net/tracker/?func=detail&atid=1089171&aid=3531997&group_id=233297 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1089171&aid=3530731&group_id=233297 |
|
From: Favux ... <fav...@gm...> - 2012-10-06 16:24:18
|
Hi Viktoria, On Sat, Oct 6, 2012 at 10:42 AM, Viktoria S. <vik...@fr...> wrote: > > I wasn't able to configure the gnome control center. > It always displays: No tablet detected Please plug in or turn on your Wacom tablet. Darn. I don't see a Vendor ID check in the libwacom code, just a get on the Vendor ID in the data file. So I was hoping just adding the .tablet file was all that was needed. Thank you for checking that out. If there is a registration that needs to be updated I don't know how to do that. I don't think it is worth patching and compiling libwacom to test it further. > I have created /usr/share/libwacom/geniusmousepen-i608x.tablet (see attachment) but no luck :( Thanks. Looks good so I don't think that's the problem. Favux |
|
From: Nikolai K. <sp...@gm...> - 2012-10-06 15:54:48
|
Hi Mark, On Sun, Sep 23, 2012 at 11:07 PM, Nikolai Kondrashov <sp...@gm...> wrote: > Otherwise, I could be able to do this remotely, but it would take time and > extra effort. > > If you have any questions, don't hesitate to contact me. Did you encounter any difficulties? Do you need help? Just ask. I addition to e-mail, you can also use Google Talk to reach me. Good luck! Sincerely, Nick |
|
From: Viktoria S. <vik...@fr...> - 2012-10-06 15:42:21
|
Hi Favux, I wasn't able to configure the gnome control center. It always displays: No tablet detected Please plug in or turn on your Wacom tablet. I have created /usr/share/libwacom/geniusmousepen-i608x.tablet (see attachment) but no luck :( Regards: Viktoria "Favux ..." <fav...@gm...> írta: >Hi Viktoria,> > Threshold sets the minimum pressure for a Button 1 event, see 'man> wacom'. Basically you can determine how much pressure is needed to> before a light line appears.> > Thanks :) If you want to try getting the tablet on the Wacom configuration> applet instructions for a data file are here:> http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Libwacom> The files are located at /usr/share/libwacom. I'll attach as a> sample the Waltop ones I submitted.> > Favux> |
|
From: Nikolai K. <sp...@gm...> - 2012-10-06 12:12:50
|
Hi Viktoria, On 10/04/2012 04:28 PM, Viktoria S. wrote: > I am experiencing with Ubuntu 12.10 Beta 2. As you may know this version of > Ubuntu comes with Gimp 2.8. I would like to try out if I can disable the > mouse so there won't be a need to give the device names a unique name. > Do you have any advice how can I do that? (Earlier you mentioned that this > is possible.) Basically, you need to match against device description in an udev rule, tag matched device, then match against that tag in an X.org InputClass and disable it. Udev provides EV_*, ABS_*, REL_*, etc bits in the environment to match against. Use "udevadm monitor" when plugging the tablet in and you'll see them. See also /usr/include/linux/input.h for specific bit values. Consult "Writing udev rules" and man xorg.conf. Contact me, if there is anything you can't find out. Sincerely, Nick |
|
From: Favux ... <fav...@gm...> - 2012-10-05 15:59:37
|
Hi Viktoria, Threshold sets the minimum pressure for a Button 1 event, see 'man wacom'. Basically you can determine how much pressure is needed to before a light line appears. If you want to try getting the tablet on the Wacom configuration applet instructions for a data file are here: http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Libwacom The files are located at /usr/share/libwacom. I'll attach as a sample the Waltop ones I submitted. Favux |
|
From: Viktoria S. <vik...@fr...> - 2012-10-05 15:51:52
|
Hi Favux, "Favux ..." <fav...@gm...> wrote: >Hi Viktoria S.,> > Nice! So the generic stylus routine is supporting the KYEs. Cool.> > These error lines are pretty standard:> [ 122.091] (EE) Genius MousePen i608X stylus: Invalid type 'eraser'> for this device.> [ 122.091] (EE) Genius MousePen i608X stylus: Invalid type 'cursor'> for this device.> [ 122.091] (EE) Genius MousePen i608X stylus: Invalid type 'touch'> for this device.> [ 122.091] (EE) Genius MousePen i608X stylus: Invalid type 'pad' for> this device.> That's the code checking for other Wacom input tools and not finding them.> > OK. Cool. Does xsetwacom work to set the pressure, threshold, and pen buttons?> http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Xsetwacom> > If so we could look at adding a .tablet data file to libwacom and see> if that gets the KYE pen configurable by the Gnome Wacom tablet applet> in System Settings.> I was able to set the buttons and the pressure curve and it affected the way the tablet behaved. I was able to set different threshold values as well, but I don't know what kind of affect does this suppose to have on the pen. I tried to draw with different threshold values, but to me there was not much difference to me. Regards: Viktoria |
|
From: Favux ... <fav...@gm...> - 2012-10-05 14:12:58
|
Hi Viktoria S.,
Nice! So the generic stylus routine is supporting the KYEs. Cool.
These error lines are pretty standard:
[ 122.091] (EE) Genius MousePen i608X stylus: Invalid type 'eraser'
for this device.
[ 122.091] (EE) Genius MousePen i608X stylus: Invalid type 'cursor'
for this device.
[ 122.091] (EE) Genius MousePen i608X stylus: Invalid type 'touch'
for this device.
[ 122.091] (EE) Genius MousePen i608X stylus: Invalid type 'pad' for
this device.
That's the code checking for other Wacom input tools and not finding them.
I'm not sure it would buy you anything to add KYEs to xf86WacomDefs.h:
/* vendor IDs on the kernel device */
#define WACOM_VENDOR_ID 0x056a
#define WALTOP_VENDOR_ID 0x172F
#define NTRIG_VENDOR_ID 0x1b96
#define HANWANG_VENDOR_ID 0x0b57
#define LENOVO_VENDOR_ID 0x17ef
Or the tablet to wcmUSB.c, for example:
{ WALTOP_VENDOR_ID, 0x501, 100000, 100000, &usbBamboo },
{ WALTOP_VENDOR_ID, 0x502, 200000, 200000, &usbIntuos4 },
{ WALTOP_VENDOR_ID, 0x503, 200000, 200000, &usbIntuos4 },
/* N-Trig devices */
{ NTRIG_VENDOR_ID, 0x01, 44173, 36772, &usbTabletPC },
Does xsetwacom work to set the pressure, threshold, and pen buttons?
http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Xsetwacom
If so we could look at adding a .tablet data file to libwacom and see
if that gets the KYE pen configurable by the Gnome Wacom tablet applet
in System Settings.
Favux
|
|
From: Viktoria S. <vik...@fr...> - 2012-10-05 13:54:13
|
Hi! I just tested my Genius Mousepen i608X with the wacom driver in Xubuntu 12.10 Beta 2 64 bit and it worked :) :) :) I am so happy! I have got Genius MousePen i608X (for the mouse) and Genius MousePen i608X stylus (for the pen) in xinput list so I can use my tablet in Gimp 2.8 without hacking it. I have got pressure in Krita and in Blender too and of course in all of the other applications as well (I haven't tested Alchemy yet) and configuring the device is so much easier now. I have created /etc/X11/xorg.conf.d/52-genius-on-wacom.conf with the following content: Section "InputClass" Identifier "Kye class" MatchProduct "i608X" MatchIsTablet "on" MatchDevicePath "/dev/input/event*" Driver "wacom" EndSection There are two things I have noted: 1. In the GTK input devices dialogues I have got X tilt, Y tilt and Wheel as well even though my device does not support these. 2. In the Xorg.log there are the following messages: [ 122.091] (II) Genius MousePen i608X: type not specified, assuming 'stylus'. [ 122.091] (II) Genius MousePen i608X: other types will be automatically added. [ 122.091] (--) Genius MousePen i608X stylus: using pressure threshold of 27 for button 1 [ 122.091] (--) Genius MousePen i608X stylus: Wacom Unknown USB tablet maxX=20480 maxY=15360 maxZ=1023 resX=100000 resY=100000 tilt=enabled [ 122.091] (II) Genius MousePen i608X stylus: hotplugging dependent devices. [ 122.091] (EE) Genius MousePen i608X stylus: Invalid type 'eraser' for this device. [ 122.091] (EE) Genius MousePen i608X stylus: Invalid type 'cursor' for this device. [ 122.091] (EE) Genius MousePen i608X stylus: Invalid type 'touch' for this device. [ 122.091] (EE) Genius MousePen i608X stylus: Invalid type 'pad' for this device. I am not quite sure if there should be something to do about the (EE) lines or not, but it seems the device works well anyways.... Best wishes: Viktoria |
|
From: Viktoria S. <vik...@fr...> - 2012-10-04 13:55:44
|
Hi! I am experiencing with Ubuntu 12.10 Beta 2. As you may know this version of Ubuntu comes with Gimp 2.8. I would like to try out if I can disable the mouse so there won't be a need to give the device names a unique name. Do you have any advice how can I do that? (Earlier you mentioned that this is possible.) Thanks in advance. Kind regards: Viktoria Nikolai Kondrashov <sp...@gm...> wrote: The evdev driver doesn work with udev, but instead queries kernel directly> using EVIOCGNAME ioctl.> > Maybe there is a way to change that name, but I haven't found it.> > You still have the option of disabling the mouse event device if you don't> use it.> > Sincerely,> Nick> |
|
From: Nikolai K. <sp...@gm...> - 2012-09-23 20:19:37
|
On Sun, Sep 23, 2012 at 11:07 PM, Nikolai Kondrashov <sp...@gm...> wrote: > Thanks, the trace is good. However, it is similar to what I've seen with the > TWHL850: there are no "SET" requests, only "GET" requests, and yet the > tablet To be precise, there *are* some "SET" requests, but these are just standard setup: SET CONFIGURATION and SET IDLE. SET CONFIGURATION sets the only configuration available and SET IDLE is just the default HID protocol setup. Sincerely, Nick |
|
From: Nikolai K. <sp...@gm...> - 2012-09-23 20:07:18
|
Hi Mark, On 09/23/2012 08:31 AM, Mark Coelho wrote: > > What do you mean by "strangely"? > > It appears the UC-Logic drivers don't work at all; it's Microsoft > generic drivers that take over if I uninstall the Huion drivers. Anyway, > the pressure sensitivity completely disappears, the lower button doesn't > register, and it feels like the accuracy goes down. (I haven't spent > much time exploring this; Windows support work isn't our goal) The stock UC-Logic drivers won't work, because they're matching the UC-Logic vendor ID, while the tablet uses Huion vendor ID. Huion ships modified drivers, which use their VID. You can compare their Tablet2k.inf files - there isn't that much difference. > For the record this model is supposed to feature: 2048 pressure levels, > 5080 lpi, and 220 rps > > Just thought I'd mention it as none of these seem to be standard fare > among the non-wacom tablets. These are not unusual characteristics for the latest non-Wacom tablets. I think it should in fact support the advertised resolution. > Had a go at this, took a little while to figure out a couple issues that > I missed or forgot about. (Virtualbox OSE is useless for this purpose) > WireShark capture included, let me know if I messed it up somehow. Below > I've included a basic outline of the steps taken, in case I skipped > something important. > > My Process: Setup VM, install driver, connect tablet through usb pass > through, confirm function. Disconnect tablet, start Wireshark capture, > connect tablet. Wait till Windows confirms the tablet device and capture > seems to stop collecting new data, stop capture, save. Thanks, the trace is good. However, it is similar to what I've seen with the TWHL850: there are no "SET" requests, only "GET" requests, and yet the tablet changes state, which is, of course, a needless abuse of the protocol. It is hard to say which of the requests switch(es) it to the proprietary mode. I would suspect GET STRING DESCRIPTOR requests, because responses are not strings, but it may be anything else. So, to find this out, try sending the same sequence of requests to the tablet, see that it enables the proprietary mode and then do a binary search to narrow it down. Please note, that the trace contains two initialization sequences: first from Linux host, next from Windows guest. I do this by modifying usbhid-dump to send reports before starting report dumping. Checkout "kye" branch for an example. I also have a "waltop" branch locally, will have to remember to push it to the repo. You will need to learn some libusb usage and a little of the USB HID protocol to do that. Otherwise, I could be able to do this remotely, but it would take time and extra effort. If you have any questions, don't hesitate to contact me. Sincerely, Nick |
|
From: Nikolai K. <sp...@gm...> - 2012-09-22 20:03:20
|
Hi Mark, On Sat, Sep 22, 2012 at 9:10 AM, Mark Coelho <mar...@ou...> wrote: > Diagnostics of Huion Model: 580 Pen Tablet Thanks, diagnostics are well done. I've committed the data to the "devices" repo: http://digimend.git.sourceforge.net/git/gitweb.cgi?p=digimend/devices.git > Officially, the manufacturer/packager of this tablet is ShenZhen Huion > Animation Technology Co. Ltd It seems, they've changed the Vendor ID, but otherwise it looks a lot like a UC-Logic model would. > For the record, this tablet behaves strangely when setup in Windows via > UC-Logic drivers, and can click, but not point in Ubuntu 12.04 x64 What do you mean by "strangely"? It is no wonder it doesn't work properly in Linux as its factory report descriptor messes up generic HID driver understanding of its axes, as usual with UC-Logic. Now, about the protocol. This is the first UC-Logic-based tablet model I've seen that requires special initialization to work at full pen resolution. Without it, this tablet reports pen coordinates in 0-0x7FF range, which is not suitable for graphics work. The UC-Logic Wireless Tablet TWHL850 also requires proprietary mode to enable consistent frame button reporting, but otherwise reports normal resolution. So, to make it work properly, we would need to discover how to do that initialization. I good way to do that is to capture traffic from the Windows driver at the tablet initialization time and to isolate the sequence that triggers it. You can do this either with a native Windows install, using Windows-based USB sniffer, or with a Windows running in a VM on Linux host with the help of Wireshark, for example. I've never tried the former, but I assume the latter is easier. There are lots of HOWTO's and pointers on how to do this easily locatable with Google, but if you have any difficulty, please write. Otherwise, we can arrange for a Google Talk session or a hangout. I'm on EEST and, I assume, you're on EDT. So we can talk in the mornings/evenings. However, if the problem doesn't require live talking, it's better to resolve it via e-mail, copying to the maillist, as it then would be publicly archived. Sincerely, Nick |
|
From: Nikolai K. <sp...@gm...> - 2012-09-21 08:29:27
|
Hi Mark, I'm copying my reply to the DIGImend-devel maillist. Please reply using "Reply to all" to keep others posted. On Fri, Sep 21, 2012 at 8:04 AM, Mark Coelho <mar...@ou...> wrote: > I'd like to help out with the DIGImend project. Glad to hear that :)! > I'm a student, comfortable in C, Good. Can I see the most low-level C code you've written? > through I only know git's workings in concept. Have you used any VCS before? > While I'm currently probably under qualified, if I'm given a task, I'm > confident I can figure out how to do it. It would be boring if there was nothing to learn :) > A background in IT support and training means I'm used to communicating to a > variety of users via email in a formal capacity. Very good. > To get started, I've acquired a tablet that doesn't appear on any of your > lists, the Huion 580. Judging from the drivers they provide, it should be a rebranded UC-Logic tablet. > Once I get a drive cleared off I'll install linux (do you guys have a > prefered distro for testing/development?) and see if any of the existing > drivers work. I'm using Debian myself and so will be able to provide the most assistance with it. However, Ubuntu or Mint would be OK too. Additionally, I've started using Fedora at work, so will be able to give help with it too. Please install the latest release. If you choose Debian, please install testing. First thing you can do after you've installed Linux is to go through our "Collecting tablet diagnostics" HOWTO here: http://sf.net/apps/mediawiki/digimend/?title=Collecting_tablet_diagnostics Next thing is to try reading the USB HID specification and seeing how much sense you can make of it: http://www.usb.org/developers/devclass_docs/HID1_11.pdf > I can say for now that pressure sensitivity is problematic in every open > source tool I've tested in windows. What kind of problem did you have? Sincerely, Nick |
|
From: Nikolai K. <sp...@gm...> - 2012-09-13 11:15:35
|
Hi David, On Wed, Sep 12, 2012 at 10:26 PM, david schryer <da...@sy...> wrote: > I was forced to change kernels to the 3.5 series. > Do you have a solution for this kernel? Where do you get the 3.5 kernels? Do you build them yourself? Do you still use lowlatency flavour? Sincerely, Nick |
|
From: Nikolai K. <sp...@gm...> - 2012-09-09 12:34:10
|
Hi Gregory, On 09/09/2012 02:19 PM, Gregory MacKenzie wrote: > Sorry I took so long getting back to you but this is the first chance I've > had to sit down with the debs and Gimp to properly test the tablet and > pen. I am happy to report that your debs are working and after rebooting > the pen was immediately usable in the Ubuntu 12.04 LTS interface. I was > able to use it to point on icons and menus, and click with the top button > to bring up context menus. > > In Gimp I followed the directions here: > > http://askubuntu.com/questions/48771/how-to-set-pressure-sensitivity-in-gimp-to-control-line-thickness > > In/Configure Extended Input Devices/ the pen shows up in the devices list > as the last entry "HA06S", and all I had to do was change the setting from > "disabled" to "screen". After I did that I was able to use the /brush > dynamics/ and set the size to vary the stroke with pressure. > > So, fantastic work! Thanks a lot! Glad to hear that it worked for you :) > I'm not sure what to do with the mechanical buttons on the left of the > tablet, F1 through F8. These should be bound to eight keys from the F1-F24 range. The specific binding depends on tablet modification. I'm yet to decide how to better handle these buttons. > Similarly, the tablet has a set of user assignable areas (palette buttons) > at the top edge of the palette which are activated when you click on them > with the pen. I don't really use these much even in Windows Vista. On the > Windows side of things a control panel allows the user to define what > these do. I can send you some screen shots of that if you are interested. > I'm assuming the /Wacom Graphics Table//t/ system settings would be the > place where these type of settings might eventually be defined. In > practical terms, in daily use, I hardly use either of these at all. In > fact, the Windows control panel allows you to use the whole palette to > draw with, and turns the palette buttons off, so I really don't miss them > at all. I typically use the keyboard for the functions which might be > defined for the mechanical buttons. That's the reason we don't support them - they're hardly useful. > I am so happy that I can draw with the tablet! Thanks Nick for all your > hard work! I really appreciate the email and the debs. let me know if I > can help with further testing etc. You're welcome :) Thanks, I'll need some testing if I ever get to do the proprietary mode driver for UC-Logic tablets. I've just released a new version of kernel patches package, which includes your tablet and also updated kernel packages to use it. From now on, you will be able to download updated kernel packages from here: https://sourceforge.net/projects/digimend/files/kernel-packages/ Sincerely, Nick |
|
From: Favux ... <fav...@gm...> - 2012-09-07 20:11:50
|
Hi Martin, You appear to have a rebranded Hanwang tablet. Vendor ID Hanwang = 0b57 Vendor ID Hanvon = 20b3 Which likely explains why the Hanvon driver doesn't work. A while ago someone from Hanwang contacted the Linux Wacom Project and asked that the Hanwang's use the Wacom X driver and submitted patches to change the 50-wacom.conf usb snippet to include their name in the MatchProduct line: Section "InputClass" Identifier "Wacom class" MatchProduct "Wacom|WACOM|Hanwang|PTK-540WL" MatchDevicePath "/dev/input/event*" Driver "wacom" EndSection and add Hanwang to xf86-WacomDefs.h /* vendor IDs on the kernel device */ #define WACOM_VENDOR_ID 0x056a #define WALTOP_VENDOR_ID 0x172F #define NTRIG_VENDOR_ID 0x1b96 #define HANWANG_VENDOR_ID 0x0b57 #define LENOVO_VENDOR_ID 0x17ef So you should already have a X driver that supports your tablet. Check your Xorg.0.log in /var/log and see if the the tablet is being matched to the wacom driver and if not what the error messages are. Favux |
|
From: Jason G. <kil...@gm...> - 2012-09-05 16:56:49
|
Pushed into the repo.
Jason
---
Day xee-nee-svsh duu-'ushtlh-ts'it;
nuu-wee-ya' duu-xan' 'vm-nvshtlh-ts'it.
Huu-chan xuu naa~-gha.
On Tue, Aug 28, 2012 at 1:17 PM, Nikolai Kondrashov <sp...@gm...> wrote:
> Use tilt range and, optionally, resolution reported by the kernel for event
> devices.
>
> Add a constant for resolution currently expected by applications: TILT_RES,
> 1 point per degree in kernel units (points/radian). Scale values to this
> resolution for compatibility and specify it for corresponding valuators
> (instead of 1) for future use by applications.
>
> Add constants for currently reported value limits: TILT_MIN and TILT_MAX,
> -64 and 63 respectively. Continue clamping values to [TILT_MIN, TILT_MAX]
> for compatibility.
>
> Values and ranges reported by currently supported tablets should remain
> unchanged.
>
> Signed-off-by: Nikolai Kondrashov <sp...@gm...>
> ---
>
> Renamed wcmTilt[XY]<Noun> to wcmTilt<Noun>[XY] to better match the
> conventions.
> Clarified range-centering comments.
> Replaced TODO items with a cleaner one in the header.
>
> src/wcmCommon.c | 2 --
> src/wcmFilter.c | 16 +++++-----
> src/wcmISDV4.c | 14 +++++++--
> src/wcmUSB.c | 82 +++++++++++++++++++++++++++++++++++++++++++++++++--
> src/xf86Wacom.c | 10 ++++---
> src/xf86WacomDefs.h | 20 +++++++++++--
> 6 files changed, 124 insertions(+), 20 deletions(-)
>
> diff --git a/src/wcmCommon.c b/src/wcmCommon.c
> index d10c1d1..650f8f5 100644
> --- a/src/wcmCommon.c
> +++ b/src/wcmCommon.c
> @@ -1431,8 +1431,6 @@ WacomCommonPtr wcmNewCommon(void)
> common->wcmMaxTouchY = 1024; /* max touch Y value */
> common->wcmMaxStripX = 4096; /* Max fingerstrip X */
> common->wcmMaxStripY = 4096; /* Max fingerstrip Y */
> - common->wcmMaxtiltX = 128; /* Max tilt in X directory */
> - common->wcmMaxtiltY = 128; /* Max tilt in Y directory */
> common->wcmCursorProxoutDistDefault = PROXOUT_INTUOS_DISTANCE;
> /* default to Intuos */
> common->wcmSuppress = DEFAULT_SUPPRESS;
> diff --git a/src/wcmFilter.c b/src/wcmFilter.c
> index 47e958a..e55ef0f 100644
> --- a/src/wcmFilter.c
> +++ b/src/wcmFilter.c
> @@ -298,16 +298,16 @@ int wcmFilterCoord(WacomCommonPtr common, WacomChannelPtr pChannel,
> ds->device_type == ERASER_ID))
> {
> ds->tiltx = tx / common->wcmRawSample;
> - if (ds->tiltx > common->wcmMaxtiltX/2-1)
> - ds->tiltx = common->wcmMaxtiltX/2-1;
> - else if (ds->tiltx < -common->wcmMaxtiltX/2)
> - ds->tiltx = -common->wcmMaxtiltX/2;
> + if (ds->tiltx > common->wcmTiltMaxX)
> + ds->tiltx = common->wcmTiltMaxX;
> + else if (ds->tiltx < common->wcmTiltMinX)
> + ds->tiltx = common->wcmTiltMinX;
>
> ds->tilty = ty / common->wcmRawSample;
> - if (ds->tilty > common->wcmMaxtiltY/2-1)
> - ds->tilty = common->wcmMaxtiltY/2-1;
> - else if (ds->tilty < -common->wcmMaxtiltY/2)
> - ds->tilty = -common->wcmMaxtiltY/2;
> + if (ds->tilty > common->wcmTiltMaxY)
> + ds->tilty = common->wcmTiltMaxY;
> + else if (ds->tilty < common->wcmTiltMinY)
> + ds->tilty = common->wcmTiltMinY;
> }
>
> return 0; /* lookin' good */
> diff --git a/src/wcmISDV4.c b/src/wcmISDV4.c
> index 37c8ee3..2528254 100644
> --- a/src/wcmISDV4.c
> +++ b/src/wcmISDV4.c
> @@ -405,8 +405,18 @@ static int isdv4GetRanges(InputInfoPtr pInfo)
> common->wcmMaxY = reply.y_max;
> if (reply.tilt_x_max && reply.tilt_y_max)
> {
> - common->wcmMaxtiltX = reply.tilt_x_max;
> - common->wcmMaxtiltY = reply.tilt_y_max;
> + common->wcmTiltOffX = 0 - reply.tilt_x_max / 2;
> + common->wcmTiltFactX = 1.0;
> + common->wcmTiltMinX = 0 + common->wcmTiltOffX;
> + common->wcmTiltMaxX = reply.tilt_x_max +
> + common->wcmTiltOffX;
> +
> + common->wcmTiltOffY = 0 - reply.tilt_y_max / 2;
> + common->wcmTiltFactY = 1.0;
> + common->wcmTiltMinY = 0 + common->wcmTiltOffY;
> + common->wcmTiltMaxY = reply.tilt_y_max +
> + common->wcmTiltOffY;
> +
> common->wcmFlags |= TILT_ENABLED_FLAG;
> }
>
> diff --git a/src/wcmUSB.c b/src/wcmUSB.c
> index 1a1951d..f25116b 100644
> --- a/src/wcmUSB.c
> +++ b/src/wcmUSB.c
> @@ -572,6 +572,82 @@ int usbWcmGetRanges(InputInfoPtr pInfo)
> common->wcmMaxStripX = absinfo.maximum;
> }
>
> + /* X tilt range */
> + if (ISBITSET(abs, ABS_TILT_X) &&
> + !ioctl(pInfo->fd, EVIOCGABS(ABS_TILT_X), &absinfo))
> + {
> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)
> + /* If resolution is specified */
> + if (absinfo.resolution > 0)
> + {
> + /* Assume the range is centered on zero */
> + common->wcmTiltOffX = 0;
> + /* Convert to resolution expected by applications */
> + common->wcmTiltFactX = TILT_RES /
> + (double)absinfo.resolution;
> + }
> + else
> +#endif
> + {
> + /*
> + * Center the reported range on zero to support
> + * kernel drivers still reporting non-zero-centered
> + * values.
> + */
> + common->wcmTiltOffX = - (absinfo.minimum +
> + absinfo.maximum) / 2;
> + /*
> + * Assume reported resolution is the one expected by
> + * applications
> + */
> + common->wcmTiltFactX = 1.0;
> + }
> + common->wcmTiltMinX = round((absinfo.minimum +
> + common->wcmTiltOffX) *
> + common->wcmTiltFactX);
> + common->wcmTiltMaxX = round((absinfo.maximum +
> + common->wcmTiltOffX) *
> + common->wcmTiltFactX);
> + }
> +
> + /* Y tilt range */
> + if (ISBITSET(abs, ABS_TILT_Y) &&
> + !ioctl(pInfo->fd, EVIOCGABS(ABS_TILT_Y), &absinfo))
> + {
> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)
> + /* If resolution is specified */
> + if (absinfo.resolution > 0)
> + {
> + /* Assume the range is centered on zero */
> + common->wcmTiltOffY = 0;
> + /* Convert to resolution expected by applications */
> + common->wcmTiltFactY = TILT_RES /
> + (double)absinfo.resolution;
> + }
> + else
> +#endif
> + {
> + /*
> + * Center the reported range on zero to support
> + * kernel drivers still reporting non-zero-centered
> + * values.
> + */
> + common->wcmTiltOffY = - (absinfo.minimum +
> + absinfo.maximum) / 2;
> + /*
> + * Assume reported resolution is the one expected by
> + * applications
> + */
> + common->wcmTiltFactY = 1.0;
> + }
> + common->wcmTiltMinY = round((absinfo.minimum +
> + common->wcmTiltOffY) *
> + common->wcmTiltFactY);
> + common->wcmTiltMaxY = round((absinfo.maximum +
> + common->wcmTiltOffY) *
> + common->wcmTiltFactY);
> + }
> +
> /* max finger strip Y for tablets with Expresskeys
> * or physical Y for touch devices in hundredths of a mm */
> if (ISBITSET(abs, ABS_RY) &&
> @@ -1045,10 +1121,12 @@ static int usbParseAbsEvent(WacomCommonPtr common,
> ds->rotation = event->value;
> break;
> case ABS_TILT_X:
> - ds->tiltx = event->value - common->wcmMaxtiltX/2;
> + ds->tiltx = round((event->value + common->wcmTiltOffX) *
> + common->wcmTiltFactX);
> break;
> case ABS_TILT_Y:
> - ds->tilty = event->value - common->wcmMaxtiltY/2;
> + ds->tilty = round((event->value + common->wcmTiltOffY) *
> + common->wcmTiltFactY);
> break;
> case ABS_PRESSURE:
> ds->pressure = event->value;
> diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
> index 6581ab5..c52db8d 100644
> --- a/src/xf86Wacom.c
> +++ b/src/xf86Wacom.c
> @@ -223,8 +223,9 @@ static int wcmInitAxes(DeviceIntPtr pWcm)
> if (IsPen(priv))
> {
> label = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_X),
> - min = -64;
> - max = 63;
> + min_res = max_res = res = round(TILT_RES);
> + min = TILT_MIN;
> + max = TILT_MAX;
> }
> else if (IsCursor(priv))
> {
> @@ -251,8 +252,9 @@ static int wcmInitAxes(DeviceIntPtr pWcm)
> if (IsPen(priv))
> {
> label = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_Y);
> - min = -64;
> - max = 63;
> + min_res = max_res = res = round(TILT_RES);
> + min = TILT_MIN;
> + max = TILT_MAX;
> }
> else if (IsCursor(priv))
> {
> diff --git a/src/xf86WacomDefs.h b/src/xf86WacomDefs.h
> index c978243..e6f8757 100644
> --- a/src/xf86WacomDefs.h
> +++ b/src/xf86WacomDefs.h
> @@ -43,6 +43,11 @@
> #define MAX_ROTATION_RANGE 1800 /* the maximum range of the marker pen rotation */
> #define MAX_ABS_WHEEL 1023 /* the maximum value of absolute wheel */
>
> +#define TILT_RES (180/M_PI) /* Reported tilt resolution in points/radian
> + (1/degree) */
> +#define TILT_MIN -64 /* Minimum reported tilt value */
> +#define TILT_MAX 63 /* Maximum reported tilt value */
> +
> #define MIN_PAD_RING 0 /* I4 absolute scroll ring min value */
> #define MAX_PAD_RING 71 /* I4 absolute scroll ring max value */
>
> @@ -440,8 +445,19 @@ struct _WacomCommonRec
> /* tablet Z resolution is equivalent
> * to wcmMaxZ which is equal to 100% pressure */
> int wcmMaxDist; /* tablet max distance value */
> - int wcmMaxtiltX; /* styli max tilt in X directory */
> - int wcmMaxtiltY; /* styli max tilt in Y directory */
> +
> + /*
> + * TODO Remove wcmTiltOff*, once the kernel drivers reporting
> + * non-zero-centered tilt values are no longer in use.
> + */
> + int wcmTiltOffX; /* styli tilt offset in X direction */
> + int wcmTiltOffY; /* styli tilt offset in Y direction */
> + double wcmTiltFactX; /* styli tilt factor in X direction */
> + double wcmTiltFactY; /* styli tilt factor in Y direction */
> + int wcmTiltMinX; /* styli min reported tilt in X direction */
> + int wcmTiltMinY; /* styli min reported tilt in Y direction */
> + int wcmTiltMaxX; /* styli max reported tilt in X direction */
> + int wcmTiltMaxY; /* styli max reported tilt in Y direction */
>
> int wcmMaxStripX; /* Maximum fingerstrip X */
> int wcmMaxStripY; /* Maximum fingerstrip Y */
> --
> 1.7.10.4
>
|
|
From: Nikolai K. <sp...@gm...> - 2012-09-04 12:24:07
|
Hi Gregory, On Mon, Sep 3, 2012 at 4:48 PM, Gregory MacKenzie <sea...@ya...> wrote: > I have a Monoprice Tablet which you currently identify as "UC-Logic Tablet > TWHA60" I refer you to yoru url at > http://sourceforge.net/apps/mediawiki/digimend/index.php?title=UC-Logic_Tablet_TWHA60 > > If you require further information please don't hesitate to contact me. I am > as yet unable to get the tablet to work with Ubuntu 12.04 LTS. Which I > understand uses kernel 3.2. I have built a 3.2 kernel for 64-bit Ubuntu 12.04 with the tablet support patch applied. Here are the links to the packages, along with md5 checksums and file names: http://rghost.net/39767329 0e5abe4602941a2228a860454c247785 linux-image-3.2.0-29.46+uclogic-twha60-generic-uclogic-twha60_3.2.0-29.46+uclogic-twha60.1_amd64.deb http://rghost.net/39767356 d88fe098fa81be4e03e464dd6239982b linux-headers-3.2.0-29.46+uclogic-twha60_3.2.0-29.46+uclogic-twha60.1_all.deb http://rghost.net/39767358 95c31fa9b7309b8ee21e740a43d64fb3 linux-headers-3.2.0-29.46+uclogic-twha60-generic-uclogic-twha60_3.2.0-29.46+uclogic-twha60.1_amd64.deb If you're using the 64-bit version, please install them, reboot into the new kernel and try using your tablet. If you're using the 32-bit version, I can build packages for you a bit later. Sincerely, Nick |
|
From: Gregory M. <sea...@ya...> - 2012-09-03 13:49:47
|
Hi, I have a Monoprice Tablet which you currently identify as "UC-Logic Tablet TWHA60" I refer you to yoru url at http://sourceforge.net/apps/mediawiki/digimend/index.php?title=UC-Logic_Tablet_TWHA60 If you require further information please don't hesitate to contact me. I am as yet unable to get the tablet to work with Ubuntu 12.04 LTS. Which I understand uses kernel 3.2. Greg MacKenzie ~$ lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 006: ID 0bda:0111 Realtek Semiconductor Corp. Card Reader Bus 002 Device 002: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse Bus 002 Device 003: ID 043d:00bb Lexmark International, Inc. 2300 series Bus 002 Device 004: ID 04fc:0561 Sunplus Technology Co., Ltd Flexcam 100 Bus 002 Device 005: ID 5543:0781 UC-Logic Technology Corp. |
|
From: Nikolai K. <sp...@gm...> - 2012-08-28 20:18:28
|
Use tilt range and, optionally, resolution reported by the kernel for event
devices.
Add a constant for resolution currently expected by applications: TILT_RES,
1 point per degree in kernel units (points/radian). Scale values to this
resolution for compatibility and specify it for corresponding valuators
(instead of 1) for future use by applications.
Add constants for currently reported value limits: TILT_MIN and TILT_MAX,
-64 and 63 respectively. Continue clamping values to [TILT_MIN, TILT_MAX]
for compatibility.
Values and ranges reported by currently supported tablets should remain
unchanged.
Signed-off-by: Nikolai Kondrashov <sp...@gm...>
---
Renamed wcmTilt[XY]<Noun> to wcmTilt<Noun>[XY] to better match the
conventions.
Clarified range-centering comments.
Replaced TODO items with a cleaner one in the header.
src/wcmCommon.c | 2 --
src/wcmFilter.c | 16 +++++-----
src/wcmISDV4.c | 14 +++++++--
src/wcmUSB.c | 82 +++++++++++++++++++++++++++++++++++++++++++++++++--
src/xf86Wacom.c | 10 ++++---
src/xf86WacomDefs.h | 20 +++++++++++--
6 files changed, 124 insertions(+), 20 deletions(-)
diff --git a/src/wcmCommon.c b/src/wcmCommon.c
index d10c1d1..650f8f5 100644
--- a/src/wcmCommon.c
+++ b/src/wcmCommon.c
@@ -1431,8 +1431,6 @@ WacomCommonPtr wcmNewCommon(void)
common->wcmMaxTouchY = 1024; /* max touch Y value */
common->wcmMaxStripX = 4096; /* Max fingerstrip X */
common->wcmMaxStripY = 4096; /* Max fingerstrip Y */
- common->wcmMaxtiltX = 128; /* Max tilt in X directory */
- common->wcmMaxtiltY = 128; /* Max tilt in Y directory */
common->wcmCursorProxoutDistDefault = PROXOUT_INTUOS_DISTANCE;
/* default to Intuos */
common->wcmSuppress = DEFAULT_SUPPRESS;
diff --git a/src/wcmFilter.c b/src/wcmFilter.c
index 47e958a..e55ef0f 100644
--- a/src/wcmFilter.c
+++ b/src/wcmFilter.c
@@ -298,16 +298,16 @@ int wcmFilterCoord(WacomCommonPtr common, WacomChannelPtr pChannel,
ds->device_type == ERASER_ID))
{
ds->tiltx = tx / common->wcmRawSample;
- if (ds->tiltx > common->wcmMaxtiltX/2-1)
- ds->tiltx = common->wcmMaxtiltX/2-1;
- else if (ds->tiltx < -common->wcmMaxtiltX/2)
- ds->tiltx = -common->wcmMaxtiltX/2;
+ if (ds->tiltx > common->wcmTiltMaxX)
+ ds->tiltx = common->wcmTiltMaxX;
+ else if (ds->tiltx < common->wcmTiltMinX)
+ ds->tiltx = common->wcmTiltMinX;
ds->tilty = ty / common->wcmRawSample;
- if (ds->tilty > common->wcmMaxtiltY/2-1)
- ds->tilty = common->wcmMaxtiltY/2-1;
- else if (ds->tilty < -common->wcmMaxtiltY/2)
- ds->tilty = -common->wcmMaxtiltY/2;
+ if (ds->tilty > common->wcmTiltMaxY)
+ ds->tilty = common->wcmTiltMaxY;
+ else if (ds->tilty < common->wcmTiltMinY)
+ ds->tilty = common->wcmTiltMinY;
}
return 0; /* lookin' good */
diff --git a/src/wcmISDV4.c b/src/wcmISDV4.c
index 37c8ee3..2528254 100644
--- a/src/wcmISDV4.c
+++ b/src/wcmISDV4.c
@@ -405,8 +405,18 @@ static int isdv4GetRanges(InputInfoPtr pInfo)
common->wcmMaxY = reply.y_max;
if (reply.tilt_x_max && reply.tilt_y_max)
{
- common->wcmMaxtiltX = reply.tilt_x_max;
- common->wcmMaxtiltY = reply.tilt_y_max;
+ common->wcmTiltOffX = 0 - reply.tilt_x_max / 2;
+ common->wcmTiltFactX = 1.0;
+ common->wcmTiltMinX = 0 + common->wcmTiltOffX;
+ common->wcmTiltMaxX = reply.tilt_x_max +
+ common->wcmTiltOffX;
+
+ common->wcmTiltOffY = 0 - reply.tilt_y_max / 2;
+ common->wcmTiltFactY = 1.0;
+ common->wcmTiltMinY = 0 + common->wcmTiltOffY;
+ common->wcmTiltMaxY = reply.tilt_y_max +
+ common->wcmTiltOffY;
+
common->wcmFlags |= TILT_ENABLED_FLAG;
}
diff --git a/src/wcmUSB.c b/src/wcmUSB.c
index 1a1951d..f25116b 100644
--- a/src/wcmUSB.c
+++ b/src/wcmUSB.c
@@ -572,6 +572,82 @@ int usbWcmGetRanges(InputInfoPtr pInfo)
common->wcmMaxStripX = absinfo.maximum;
}
+ /* X tilt range */
+ if (ISBITSET(abs, ABS_TILT_X) &&
+ !ioctl(pInfo->fd, EVIOCGABS(ABS_TILT_X), &absinfo))
+ {
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)
+ /* If resolution is specified */
+ if (absinfo.resolution > 0)
+ {
+ /* Assume the range is centered on zero */
+ common->wcmTiltOffX = 0;
+ /* Convert to resolution expected by applications */
+ common->wcmTiltFactX = TILT_RES /
+ (double)absinfo.resolution;
+ }
+ else
+#endif
+ {
+ /*
+ * Center the reported range on zero to support
+ * kernel drivers still reporting non-zero-centered
+ * values.
+ */
+ common->wcmTiltOffX = - (absinfo.minimum +
+ absinfo.maximum) / 2;
+ /*
+ * Assume reported resolution is the one expected by
+ * applications
+ */
+ common->wcmTiltFactX = 1.0;
+ }
+ common->wcmTiltMinX = round((absinfo.minimum +
+ common->wcmTiltOffX) *
+ common->wcmTiltFactX);
+ common->wcmTiltMaxX = round((absinfo.maximum +
+ common->wcmTiltOffX) *
+ common->wcmTiltFactX);
+ }
+
+ /* Y tilt range */
+ if (ISBITSET(abs, ABS_TILT_Y) &&
+ !ioctl(pInfo->fd, EVIOCGABS(ABS_TILT_Y), &absinfo))
+ {
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)
+ /* If resolution is specified */
+ if (absinfo.resolution > 0)
+ {
+ /* Assume the range is centered on zero */
+ common->wcmTiltOffY = 0;
+ /* Convert to resolution expected by applications */
+ common->wcmTiltFactY = TILT_RES /
+ (double)absinfo.resolution;
+ }
+ else
+#endif
+ {
+ /*
+ * Center the reported range on zero to support
+ * kernel drivers still reporting non-zero-centered
+ * values.
+ */
+ common->wcmTiltOffY = - (absinfo.minimum +
+ absinfo.maximum) / 2;
+ /*
+ * Assume reported resolution is the one expected by
+ * applications
+ */
+ common->wcmTiltFactY = 1.0;
+ }
+ common->wcmTiltMinY = round((absinfo.minimum +
+ common->wcmTiltOffY) *
+ common->wcmTiltFactY);
+ common->wcmTiltMaxY = round((absinfo.maximum +
+ common->wcmTiltOffY) *
+ common->wcmTiltFactY);
+ }
+
/* max finger strip Y for tablets with Expresskeys
* or physical Y for touch devices in hundredths of a mm */
if (ISBITSET(abs, ABS_RY) &&
@@ -1045,10 +1121,12 @@ static int usbParseAbsEvent(WacomCommonPtr common,
ds->rotation = event->value;
break;
case ABS_TILT_X:
- ds->tiltx = event->value - common->wcmMaxtiltX/2;
+ ds->tiltx = round((event->value + common->wcmTiltOffX) *
+ common->wcmTiltFactX);
break;
case ABS_TILT_Y:
- ds->tilty = event->value - common->wcmMaxtiltY/2;
+ ds->tilty = round((event->value + common->wcmTiltOffY) *
+ common->wcmTiltFactY);
break;
case ABS_PRESSURE:
ds->pressure = event->value;
diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
index 6581ab5..c52db8d 100644
--- a/src/xf86Wacom.c
+++ b/src/xf86Wacom.c
@@ -223,8 +223,9 @@ static int wcmInitAxes(DeviceIntPtr pWcm)
if (IsPen(priv))
{
label = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_X),
- min = -64;
- max = 63;
+ min_res = max_res = res = round(TILT_RES);
+ min = TILT_MIN;
+ max = TILT_MAX;
}
else if (IsCursor(priv))
{
@@ -251,8 +252,9 @@ static int wcmInitAxes(DeviceIntPtr pWcm)
if (IsPen(priv))
{
label = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_Y);
- min = -64;
- max = 63;
+ min_res = max_res = res = round(TILT_RES);
+ min = TILT_MIN;
+ max = TILT_MAX;
}
else if (IsCursor(priv))
{
diff --git a/src/xf86WacomDefs.h b/src/xf86WacomDefs.h
index c978243..e6f8757 100644
--- a/src/xf86WacomDefs.h
+++ b/src/xf86WacomDefs.h
@@ -43,6 +43,11 @@
#define MAX_ROTATION_RANGE 1800 /* the maximum range of the marker pen rotation */
#define MAX_ABS_WHEEL 1023 /* the maximum value of absolute wheel */
+#define TILT_RES (180/M_PI) /* Reported tilt resolution in points/radian
+ (1/degree) */
+#define TILT_MIN -64 /* Minimum reported tilt value */
+#define TILT_MAX 63 /* Maximum reported tilt value */
+
#define MIN_PAD_RING 0 /* I4 absolute scroll ring min value */
#define MAX_PAD_RING 71 /* I4 absolute scroll ring max value */
@@ -440,8 +445,19 @@ struct _WacomCommonRec
/* tablet Z resolution is equivalent
* to wcmMaxZ which is equal to 100% pressure */
int wcmMaxDist; /* tablet max distance value */
- int wcmMaxtiltX; /* styli max tilt in X directory */
- int wcmMaxtiltY; /* styli max tilt in Y directory */
+
+ /*
+ * TODO Remove wcmTiltOff*, once the kernel drivers reporting
+ * non-zero-centered tilt values are no longer in use.
+ */
+ int wcmTiltOffX; /* styli tilt offset in X direction */
+ int wcmTiltOffY; /* styli tilt offset in Y direction */
+ double wcmTiltFactX; /* styli tilt factor in X direction */
+ double wcmTiltFactY; /* styli tilt factor in Y direction */
+ int wcmTiltMinX; /* styli min reported tilt in X direction */
+ int wcmTiltMinY; /* styli min reported tilt in Y direction */
+ int wcmTiltMaxX; /* styli max reported tilt in X direction */
+ int wcmTiltMaxY; /* styli max reported tilt in Y direction */
int wcmMaxStripX; /* Maximum fingerstrip X */
int wcmMaxStripY; /* Maximum fingerstrip Y */
--
1.7.10.4
|