+
Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Nov 26, 2020

This should add support for the Huion H950P tablet and matching pen.

Fixes #307

Copy link
Member

@whot whot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, mostly fine except for one hard failure (w/h is required) and I'd really like a custom svg here.

@@ -0,0 +1,24 @@
# HUION
# H950P
# place in /usr/share/libwacom/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's drop this one please. Ideally, add your sysinfo data too like e.g. 72fc337 does it.

DeviceMatch=usb:256c:006d
Class=Bamboo
#Width=10
#Height=6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

width and height are required. If you run the ./run-full-test.sh script after any changes, it'll fail for things like this. This should run as part of our CI when you file a PR but for some reason travis is out again...

#Width=10
#Height=6
IntegratedIn=
Layout=huion-h610-pro.svg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A quick google for the 610 and the 950 show that there's a bit of difference in the button layouts. I'd prefer it if we had a custom svg file here instead of re-using the 610. should only be a matter of minutes to create.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would I make an svg file? Is there some tool for it, or something else?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inkscape is the reference tool here, there is no custom tool. But from a look at the 610 file I think you can just open that file, move/reshape the center buttons and done.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so I spent a couple hours in Inkscape and haven't managed to make a fully functional svg file, here's a gif showing what the problem is. This is my first time using Inkscape btw.

I duplicated a circle, ungrouped it, swapped out the two center shapes with full circles and moved them, then made sure everything was grouped only to the shapes they needed to be. I don't know what I'm doing wrong. I even started again with a fresh 610 svg file and tried to do the same thing, doing multiple iterations before giving up.

I do have a question though, how does libwacom know which shapes are linked to which actions?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do have a question though, how does libwacom know which shapes are linked to which actions?

the buttons have specific IDs, e.g. ButtonA and the lines leading to them have LeaderA etc. Inkscape shows this on ... object properties? I'd guess you have multiple objects with the same ID?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd be right about multiple objects having the same ID. I replaced all the circles with manually made rectangles to better match the tablet's buttons, none of them are being highlighted now when the tablet buttons are pressed. I've played around with object IDs, group object IDs, and fill and stroke settings, and I just can't get it to work, trying to match all the settings between the functional 610 file and the non-functional 950 file. Is there any other way that libwacom identifies the shapes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it's a bit hard to guess remotely anyway. The README has a full description of what the various names need to be, hopefully this helps you figure out what's wrong. Also, in case this wasn't already obvious: svg files are just xml files so you can grep through them to search for errors.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works, all 8 buttons seem to work. I can't thank you enough for figuring out the svg/xml stuff drrwyy. I think it's ready now.

@whot
Copy link
Member

whot commented Jan 5, 2021

Looks good, thanks. Last thing: please link to the sysinfo please like mentioned in #308 (comment)

If you can squash the commits together into just one that'd be great too, otherwise I'll do it on merge. Look up git interactive rebase for details, there are plenty of tutorials out there.

@ghost
Copy link
Author

ghost commented Jan 5, 2021

Looks good, thanks. Last thing: please link to the sysinfo please like mentioned in #308 (comment)

If you can squash the commits together into just one that'd be great too, otherwise I'll do it on merge. Look up git interactive rebase for details, there are plenty of tutorials out there.

How would I find my sysinfo? I don't see a sysinfo line in other huion .tablet files, is it absolutely necessary?

Also, you should probably squash the commits yourself, as that git interactive rebase thing looks very easy for a noob to mess up.

@whot
Copy link
Member

whot commented Jan 8, 2021

How would I find my sysinfo?

$ git clone https://github.com/linuxwacom/wacom-hid-descriptors
$ ./build/sysinfo.sh

then upload the tarball via a PR to that repo. Once you have the PR number, you can add the link to it in the .tablet file.

is it absolutely necessary?

having the sysinfo means if we run into a bug with this device lateron, we will likely have all the data we ever need to emulate the device. The alternative is chasing down contributor's github handles which has a somewhat lower success rate.

@ghost
Copy link
Author

ghost commented Jan 11, 2021

How would I find my sysinfo?

$ git clone https://github.com/linuxwacom/wacom-hid-descriptors
$ ./build/sysinfo.sh

then upload the tarball via a PR to that repo. Once you have the PR number, you can add the link to it in the .tablet file.

is it absolutely necessary?

having the sysinfo means if we run into a bug with this device lateron, we will likely have all the data we ever need to emulate the device. The alternative is chasing down contributor's github handles which has a somewhat lower success rate.

Ok, sysinfo added to the .tablet file.

@whot
Copy link
Member

whot commented Jan 25, 2021

did you file a MR in the wacom-hid-descriptors repo? I cannot find it. Without that, the sysinfo is just a link to a local file that only exists on your machine :)

@ghost
Copy link
Author

ghost commented Jan 25, 2021

did you file a MR in the wacom-hid-descriptors repo? I cannot find it. Without that, the sysinfo is just a link to a local file that only exists on your machine :)

It should be in wacom-hid-descriptors here linuxwacom/wacom-hid-descriptors#124

@whot whot merged commit 8ad644b into linuxwacom:master Jan 29, 2021
@whot
Copy link
Member

whot commented Jan 29, 2021

Merged with a minor change, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How would I go about contributing Huion H950P compatibility

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载