Repository navigation
Feature: tilt correction for pen offset. - #11
Open
Endermanbugzjfc wants to merge 2 commits into
Open
Endermanbugzjfc wants to merge 2 commits into
Endermanbugzjfc wants to merge 2 commits into
Conversation
Cancel the tilt-induced offset between the hover cursor (the digitizer's resonant-coil projection) and the pen-down nib. Adds a `tilt_correction` mode (off/tilt/tilt-distance) plus a `tilt_correction_gain` strength, exposed via CLI and config file. Defaults to off for backward compat. The correction runs in raw device space before orientation (and any downstream aspect-ratio warp), computing gain*sin(tilt) per axis, with the tilt-distance mode ramping it off by hover proximity. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Endermanbugzjfc
commented
Aug 29, 2026
…ibility Co-authored-by: EndermanbugZJFC <53002741+Endermanbugzjfc@users.noreply.github.com>
Endermanbugzjfc
marked this pull request as ready for review
September 5, 2026 11:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
This pull request adds 2 methods to correct the pen position based on its tiling angle and height.
Currently, pen positions always assume the pen is held orthogonally to the screen, which is rarely the case, hence offsetting a little when the pen tip moves from mid-air to touching the screen.
Changes
tilt_correctionoption has been added, which corresponds to the--tilt-correctionCLI argument and thetilt_correctionfield in the config file. The default value is set to "off" for backward compatibility. It may be set to "off", "tilt", or "tilt-distance". "tilt" performs the correction based on the tilting angle, while "tilt-distance" is based on both the tilting angle and the height between the screen and the electrical coil in the stylus.tilt_correction_gainoption has been added, which corresponds to the--tilt-correction-gainCLI argument and thetilt_correction_gainfield in the config file. The default value is set to 1.0. It is a float coefficient multiplied by the base tilt-correction value. This option should represent the strength of the tilt correction.Note: I have never used a real drawing tablet, but based on the information Claude provided, it seems most drawing tablets correct only based on the tilt angle and ignore the height parameter.
Live tests
Live tests are done on the following environments:
CPU Architecture: x86_64
OS: Arch Linux
Desktop Environment:
reMarkable: reMarkable 2 version 3.27.3.0