-
Notifications
You must be signed in to change notification settings - Fork 8
Description
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:

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:

seems to match the original Gaomon driver screenshot.