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

Gaomon driver has alternative conversion formula #201

Open
gonX opened this issue Sep 17, 2024 · 0 comments · May be fixed by #217
Open

Gaomon driver has alternative conversion formula #201

gonX opened this issue Sep 17, 2024 · 0 comments · May be fixed by #217
Labels
bug Something isn't working wiki Improvements or additions to the wiki

Comments

@gonX
Copy link
Member

gonX commented Sep 17, 2024

Had an issue with a user today (Discord convo) where it turns out that their Gaomon driver did not have numbers compatible with the manual calculation formulas provided on the website (General FAQ), so I had to figure out what they were. Based off the users screenshot:
image

it seems like the intended calculation necessary is:

stage 1:

  • OTD Width: (GaomonWidth / DeviceWidthUnits) * DeviceWidthMM
  • OTD Height: (GaomonHeight / DeviceHeightUnits) * DeviceHeightMM

stage 2:

  • OTD X: (GaomonX / DeviceWidthUnits) * DeviceWidthMM + (OTD_Width / 2)
  • OTD Y: (GaomonY / DeviceHeightUnits) * DeviceHeightMM + (OTD_Height / 2)

(/e: for anyone who read revision 1 of the formula, it was incorrect and did not account for Gaomon's offset being edge-based rather than center-based like OTD is)

DeviceWidthUnits and DeviceHeightUnits corresponds to MaxX/MaxY in tablet config respectively
DeviceWidthMM and DeviceHeightMM corresponds to Width and Height in tablet config respectively
CalculatedWidth and CalculatedHeight corresponds to the newly calculated values from stage 1.

for the above user this results in:
OTD width: (12620 / 33020) * 165.1 = 63.1
OTD height: (11636 / 20320) * 101.6 = 58.18
OTD X: (9854 / 33020) * 165.1 + (63.1 / 2) = 80.82
OTD Y: (3994 / 20320) * 101.6 + (58.18 / 2) = 49.06
and the following OTD result:
image
seems to match the original Gaomon driver screenshot.

@gonX gonX added bug Something isn't working wiki Improvements or additions to the wiki labels Sep 17, 2024
@gonX gonX changed the title Gaomon manual calculation formula seems wrong, or there are alternatives Gaomon driver has alternative conversion formula Sep 17, 2024
@gonX gonX linked a pull request Nov 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wiki Improvements or additions to the wiki
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant