Skip to content
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

Invert Y tilt axis when using UCLogicTiltReportParser #1841

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jkcdarunday
Copy link

@jkcdarunday jkcdarunday commented Dec 31, 2021

Introduction

While testing UCLogic tilt support using Huion RTP-700 with Krita and MyPaint on Linux, I've observed that the Y tilt axis is inverted.

Description

These changes inverts the Y tilt axis when a TiltTabletReport is generated by the UCLogicTiltReportParser.

Notes

  • This assumes that the tilt axes for other devices have no issues when on Linux (making this specific to the UCLogic parser and unlikely somewhere else like libevent)
  • Haven't tested on Windows/Mac (If it works properly on other platforms, then it's possible that the problem lies with the libevent integration instead)

@terencode
Copy link

Thanks, that's also what I noticed with my Kamvas pro 20. I will give it a try soon.

@gonX gonX added configuration Adds or modifies a tablet configuration enhancement New feature or request labels Jan 2, 2022
@terencode
Copy link

I modified the parser responsible for my tablet directly because it seemed to redefine itselfs the X, Y tilts :
https://github.com/terencode/OpenTabletDriver/blob/d44bdeb2a74482c970931f167532c73e5973483f/OpenTabletDriver.Configurations/Parsers/Huion/GianoReport.cs#L21
Tilt is correct now.
It would be interesting to test on other devices if this is parser specific or needs to be changed globally.

@AbstractQbit
Copy link
Contributor

What are the values shown in the debugger? They should be negative for tilt to the left or up, positive for tilt to the right or down (for X and Y respectively). Two huion tablets that I had my hands on (hs610 and hs611) as well as wacom tablets report tilt correctly, so this issue is either device-specific or something is wrong with how we inject tilt on linux. In any case flipping Y axis shouldn't be the default

@terencode
Copy link

What are the values shown in the debugger? They should be negative for tilt to the left or up, positive for tilt to the right or down (for X and Y respectively). Two huion tablets that I had my hands on (hs610 and hs611) as well as wacom tablets report tilt correctly, so this issue is either device-specific or something is wrong with how we inject tilt on linux.

Without the Y flipped, I get positive values when tilting up, so device-specific ?

In any case flipping Y axis shouldn't be the default

Yeah, my modification was just a dirty fix for testing.

@gonX
Copy link
Member

gonX commented Jan 2, 2022

This seems sort of sensible but I wonder if we should be fixing this another place in OTD, or with an attribute in the device configuration file.

Also HS610 and HS611 does not use a tilt-compatibler parser (at the moment), though they should very likely be using the UCLogicTiltReportParser as used here.

I'd like for this to have more testing, especially on the HS610/HS611 as this'll determine which course of action is best. @AbstractQbit can you confirm HS610/HS611 tilt axises are correct on configs (not this PR) if you use UCLogicTiltReportParser?

@gonX gonX added this to the v0.7.x milestone Jan 2, 2022
@AbstractQbit
Copy link
Contributor

Back at home now, seems like I was wrong. Just checked hs611 and it does have Y axis inverted, so it's possible that a lot of UClogic tablets report tilt that way. Can't check hs610 because I can't find it.

@AkiSakurai
Copy link
Contributor

https://github.com/DIGImend/digimend-kernel-drivers/blob/0b445150ef491cb52174aef484f6873083770171/hid-uclogic-params.c#L472
According to DIGImend, it is flipped on device using v2 protocol.

@gonX
Copy link
Member

gonX commented Nov 7, 2022

Sorry for not getting back to this earlier. This needs to be rebased to the latest version of master before we can proceed with merging.

@X9VoiD X9VoiD changed the base branch from configs to master December 29, 2022 18:53
@gonX gonX self-assigned this Oct 1, 2023
@sezanzeb
Copy link

sezanzeb commented Nov 6, 2023

Rebasing worked locally without conflicts.

For the huion kamvas 16 (2021) this needs to be adjusted in the GianoReport class.

I think this doesn't take into account that the input can be rotated. When I hardcoded the inversion into the GianoReport class, I had to invert the X axis, not the Y axis. My tablet is rotated by 180°.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Adds or modifies a tablet configuration enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants