Add configurable high-resolution K1 Max bed mesh#37
Draft
AlexFridman wants to merge 3 commits into
Draft
Conversation
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.
Summary
Add an optional, configurable full-bed mesh workflow for K1 Max PRTouch v2 printers:
BED_LEVELING POINTS=9produces a 9x9 mesh.BED_LEVELING POINTS=10produces a 10x10 mesh.mesh_min/mesh_max; Klipper calculates uniform spacing as(max - min) / (points - 1).[bed_mesh] probe_countand stockG29workflow are not changed.Why
Creality PRTouch v2 initializes exactly 36 per-point threshold entries and indexes them with the current G29 point number. A grid larger than 6x6 therefore reaches an out-of-range entry at point 37 even though Klipper bed mesh supports larger grids.
The bundled KAMP macro also recalculates its density from the static
[bed_mesh] probe_count, so an explicit higherPROBE_COUNTis currently reduced back to the configured density.Creality source reference: https://github.com/CrealityOfficial/K1_Series_Klipper/blob/main/klippy/extras/prtouch_v2_wrapper.py
A static audit of that backend found no other fixed-size structures indexed by the G29 point counter; the two threshold tables are the only 36-entry limit.
Changes
POINTS=3..10to the existingBED_LEVELINGuseful macro while retainingPROBE_COUNT=x,ycompatibility.POINTSandPROBE_COUNTare supplied;pr_version: 2(current K1 Max configuration); K1/K1C/K1 SE PRTouch v1 configurations are not patched.FULL_BED=1path that bypasses adaptive object bounds, margin, and fuzzing only for this calibration.Safety properties
G29and the static[bed_mesh] probe_countremain unchanged.Validation
python3 -m unittest discover -s tests -v— 10 tests pass with Jinja2 installed (the 4 PRTouch module tests remain stdlib-only).Hardware follow-up before marking ready