macros: restore absolute positioning after PRINT_END and before homing Z - #315
Open
kyleinoregon wants to merge 1 commit into
Open
macros: restore absolute positioning after PRINT_END and before homing Z#315kyleinoregon wants to merge 1 commit into
kyleinoregon wants to merge 1 commit into
Conversation
Cancelling a print that is paused at the purge tray left Klipper in
relative mode: PRINT_END switches to G91 for its lift and relies on
MOVE_TO_TRAY for the G90, but MOVE_TO_TRAY returns early when the head is
already at the tray. M84 then unhomes the axes. The next G28 takes the
homing override's FORCE_MOVE branch, which does not issue G90 either, so
its "G0 X128 Y128" runs as a relative move and Klipper refuses it:
Move out of range: 364.000 156.000 170.527
That blocks every homing attempt, including AFC's auto-home on T0 and the
screen's Home button, until Klipper is restarted. Force G90 in both places.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
After cancelling a print that is paused at the purge tray, every homing attempt fails with
until Klipper is restarted. That includes the screen's Home button and AFC's auto-home on a
T<n>command, so on a CANVAS machine a runout followed by a cancel leaves the user unable to load the next spool.Why
PRINT_END(whichCANCEL_PRINTcalls) switches toG91for its lift and relies onMOVE_TO_TRAYto switch back withG90.MOVE_TO_TRAYreturns early when the head is already at the tray, which is exactly where a paused print sits, so relative mode stays active.M84then unhomes the axes. On the nextG28the[homing_override]takes itsFORCE_MOVEbranch (Z not homed), which issues noG90either, so itsG0 X128 Y128runs as a relative move from the post-homing position (X 236, Y 28 after the homing retracts) and Klipper refuses X 364.Fix
PRINT_END:G90beforeMOVE_TO_TRAY, so the macro restores absolute mode itself.[homing_override]:G90beforeG0 X128 Y128, so homing works regardless of the mode a previous macro left behind.Tested
Reproduced on a CC1 with CANVAS on 26.08.0: runout pause at the tray, cancel,
T0→ the error above four times in a row, cleared only by a reboot. The klippy log confirmed relative mode and the unhomed state after the cancel, and the failing coordinates are 128 + the post-homing position on X and Y with Z at the 170 mm cancel lift.