-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: How to detect DriverCodeIDs for a specific model #19
Comments
Thanks for reaching out. Do you see your device as selection choice when running the GUI? If so it probably means the config is being saved in a weird state or under the wrong ID. The actual saving of the configuration is handled by both this GUI and the daemon code. Daemon Code:For completeness sake, the daemon code that handles saving config changes is here: https://github.com/kurikaesu/userspace-tablet-driver-daemon/blob/main/src/event_handler.cpp#L135-L150 It obtains the configuration to save from the individual device handlers themselves. For the G640, it would be here: https://github.com/kurikaesu/userspace-tablet-driver-daemon/blob/main/src/star_g640.cpp#L39-L54 Specifically line 53 is what sets the configuration by calling this function: https://github.com/kurikaesu/userspace-tablet-driver-daemon/blob/main/src/transfer_handler.cpp#L420 Gui Code:For the GUI side of things, it works by loading in the existing configuration and then overwriting a device's specific configuration then saving it. This can be seen here on the Artist 16 pro controller for example: https://github.com/kurikaesu/userspace-tablet-driver-gui/blob/main/src/main/kotlin/dev/villanueva/userland_utility/products/xppen/artist_pro_16/ArtistPro16Controller.kt#L26-L29 This is actually used here by the commitChanges code: Lines 99 to 117 in 2e9992b
Line 114 will send a message packet to the driver daemon telling it to reload the configuration which is how the config is updated in semi-real-time. |
Now that the details of the implementation are shown above, the next steps is to get you to provide a set of pull requests with the changes you have made. I'll be able to inspect what is going on in your code and hopefully either point out what needs to be updated to get it to work or we will find some weird bug/implementation difference that your specific tablet has that needs to be researched and then accounted for. Reference your pull requests (for the daemon as well if you have code changes there) in this thread once you are done. |
Okay, I got into the daemon to try and arrange a new driver for g640s, and got the buttons working (basically by copying from Still, I think the problem is within the UI. I saved my changes in the daemon to another branch, switched to main, and with the my modified version of the gui I get this:
I'll make a PR with the changes so you can try it, would love some input on this. |
Thanks. I could be remembering incorrectly since it has been a while but the generic driver doesn't really have proper mappings at it doesn't properly save anything. Not sure if that is what you are trying to do here but if you are then the first step is to make sure to create a daemon implementation for your specific device first so that it has a proper device ID to map the configurations to. Let's get the daemon changes done first so that we can make sure that all of the stylus buttons are actually assignable in the daemon itself. Once you have that PR ready please send it through and I'll have a look over it. |
I'm trying to add support for the XP-Pen G640S since I saw the controller for the G640 in the code and figured it should be almost the same.
My model has a Stylus with 2 buttons as well as 6 buttons in the tablet. I have managed to get the mappings for the tablet buttons working, but for some reason the mappings for the Stylus don't seem to work. Every time I change the mappings, I save the config, but when I open the settings again, the mappings are gone for the stylus.
I think the problem could be:
Thanks for this software btw. I recently installed the official xp-pen driver and it constantly crashes, and this has been working perfectly besides this problem.
The text was updated successfully, but these errors were encountered: