Skip to content

tools_calibrate: use raw trigger Z for probe offset - #173

Open
orion23rigel wants to merge 1 commit into
viesturz:mainfrom
orion23rigel:tools-calibrate-raw-trigger-z
Open

tools_calibrate: use raw trigger Z for probe offset#173
orion23rigel wants to merge 1 commit into
viesturz:mainfrom
orion23rigel:tools-calibrate-raw-trigger-z

Conversation

@orion23rigel

Copy link
Copy Markdown

Summary

TOOL_CALIBRATE_PROBE_OFFSET currently reads index [2] from the probe session result when calculating the new probe z_offset.

With Klipper's current probe session result type, that value is the offset-adjusted bed Z. If a probe z_offset is already configured, it is applied before the calibration math runs, causing repeated calibration to alternate between the real offset and approximately zero.

This changes the calibration to use probe_result.test_z, the raw trigger/toolhead Z position, so the existing configured probe z_offset is not folded into the new result.

Testing

Tested on a toolchanger setup where repeated TOOL_CALIBRATE_PROBE_OFFSET runs previously alternated between approximately -0.17 and 0.00. After this change, repeated runs remained consistent around the expected value.

Also ran:

  • python3 -m py_compile klipper/extras/tools_calibrate.py
  • git diff --check origin/main..tools-calibrate-raw-trigger-z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant