[1.1] Cleanup Nozzle class, fix XY vs Z move order #8248
Merged
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.
Addressing #8240, based on #8248
Two Nozzle Clean issues are fixed by this PR:
NOZZLE_CLEAN_GOBACK
. This PR fixes the Z versus XY move order by using thedo_blocking_move_to(x, y, z)
function for all Z-then-XY and XY-then-Z moves, becausedo_blocking_move_to
contains all the logic needed to decide whether to move Z before or after XY, and the logic for Delta to make sure it's in the "safe zone" first.This results in slightly smaller
Nozzle
class code with ideal behavior.Nozzle::zigzag
zigs (or zags) outside the cleaning area if the cleaning areaend.x
is less thanstart.x
or if theend.y
is less thanstart.y
. This PR rewriteszigzag
so it simply alternates sides in the narrow dimension.