Skip to content

馃悰 Fix M428 home offset calculation - #28538

Open
jujumo wants to merge 2 commits into
MarlinFirmware:bugfix-2.1.xfrom
jujumo:fix-m428-home-offset
Open

馃悰 Fix M428 home offset calculation#28538
jujumo wants to merge 2 commits into
MarlinFirmware:bugfix-2.1.xfrom
jujumo:fix-m428-home-offset

Conversation

@jujumo

@jujumo jujumo commented Aug 24, 2026

Copy link
Copy Markdown

Since home_offset is applied by G28 (position = base_home_pos + home_offset) rather than shifting the workspace, M428 was measuring against the wrong reference:

  • base_home_pos is already applied by homing, so subtracting it again shifted the coordinate system by [XYZ]_MIN_POS. With a non-zero MIN_POS the resulting offset was wrong by exactly that amount.
  • The offset already in effect is part of the current position, so a second M428 discarded the previous calibration instead of keeping it.

Take the existing home_offset into account and use 0 as the reference point, falling back to the endstop position only for an axis homing to max, as documented.

Description

Requirements

Benefits

Configurations

Related Issues

jmorat and others added 2 commits August 24, 2026 16:40
Since home_offset is applied by G28 (position = base_home_pos +
home_offset) rather than shifting the workspace, M428 was measuring
against the wrong reference:

- base_home_pos is already applied by homing, so subtracting it again
  shifted the coordinate system by [XYZ]_MIN_POS. With a non-zero
  MIN_POS the resulting offset was wrong by exactly that amount.
- The offset already in effect is part of the current position, so a
  second M428 discarded the previous calibration instead of keeping it.

Take the existing home_offset into account and use 0 as the reference
point, falling back to the endstop position only for an axis homing to
max, as documented.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

2 participants