Skip to content

interp: split loaded vs applied tool offset params (#5401-#5409, #5081-#5089)#4219

Open
grandixximo wants to merge 2 commits into
LinuxCNC:2.9from
grandixximo:fix/4216-applied-tlo-params
Open

interp: split loaded vs applied tool offset params (#5401-#5409, #5081-#5089)#4219
grandixximo wants to merge 2 commits into
LinuxCNC:2.9from
grandixximo:fix/4216-applied-tlo-params

Conversation

@grandixximo

@grandixximo grandixximo commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Commit 725231f (#3996) made #5401-#5409 report the tool length offset actually applied to motion. That matched the documentation, but broke probing routines in the wild that read #5401-#5409 right after an M6 (without a following G43) to get the loaded tool's stored offset. See #4216.

Restore the long-standing behavior of #5401-#5409 and put the applied offset in a new parameter set instead:

  • #5401-#5409: loaded tool's stored offset, refreshed from the tool table on tool change (M6), at startup, and by G10 L1/L10/L11. Reverts the convert_setup_tool / set_tool_parameters / default_tool_parameters / init_tool_parameters changes from 725231f so existing routines keep working.
  • #5081-#5089: tool length offset actually applied to motion, written by convert_tool_length_offset for G43, G43Hn, G43.1, G43.2, and zeroed by G49. This is the value 725231f intended to expose.

Docs (overview.adoc, g-code.adoc) and the interp_parameter_def.hh enum updated to describe both sets.

Fixes #4216. Re-addresses #2994 without the regression.

…1-#5089)

Commit 725231f made #5401-#5409 report the tool length offset actually
applied to motion. That matched the documentation, but broke probing
routines in the wild that read #5401-#5409 right after an M6 (without a
following G43) to get the loaded tool's stored offset. See LinuxCNC#4216.

Restore the long-standing behavior of #5401-#5409 and put the applied
offset in a new parameter set instead:

  - #5401-#5409: loaded tool's stored offset, refreshed from the tool
    table on tool change (M6), at startup, and by G10 L1/L10/L11.
    Reverts the convert_setup_tool / set_tool_parameters /
    default_tool_parameters / init_tool_parameters changes from 725231f
    so existing routines keep working.
  - #5081-#5089: tool length offset actually applied to motion, written
    by convert_tool_length_offset for G43, G43Hn, G43.1, G43.2, and
    zeroed by G49. This is the value 725231f intended to expose.

Docs (overview.adoc, g-code.adoc) and the interp_parameter_def.hh enum
updated to describe both sets.

Fixes LinuxCNC#4216. Re-addresses LinuxCNC#2994 without the regression.
Reverts c52992c (cherry-picked from 49ddfe6), which had updated the
tool-offset test assertions for the applied semantics of #5401-#5409.

Those runtime changes are reverted in this branch: #5401-#5409 again hold
the loaded tool's stored offset (M6 / G10 / init), and the applied offset
now lives in #5081-#5089. The original assertions match the restored
behavior, so restore them.

This reverts commit c52992c.
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