-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove with_probe from do_z_clearance() #27305
Open
classicrocker883
wants to merge
8
commits into
MarlinFirmware:bugfix-2.1.x
Choose a base branch
from
classicrocker883:bugfix-2.1.x-July6
base: bugfix-2.1.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+10
−14
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2f2869b
update motion.cpp - do_z_clearance
classicrocker883 157ae39
remove with_probe from do_z_clearance()
classicrocker883 c771a4f
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 e06ff8b
Merge branch 'bugfix-2.1.x' into bugfix-2.1.x-July6
classicrocker883 5a717e4
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 f7c6227
Merge branch 'bugfix-2.1.x' into bugfix-2.1.x-July6
classicrocker883 3ffdeff
Merge branch 'bugfix-2.1.x' into bugfix-2.1.x-July6
classicrocker883 4831ff8
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this change, Z_AFTER_PROBING is a fixed, absolute Z hight of the nozzle after probing. I like to have these fixed endpoints for G-code commands. But we have to keep in mind that this is a change that breaks backwards-compatibillity. Currently, users can freely adjust nozzle-to-probe offset becausse the clearance after probing will be adjusted. With this change, they must keep probe.offset.z > (- Z_AFTER_PROBING).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has nothing really to do with "backwards-compatibility", especially reverting back to older code. All this does is stop adding/subtracting the probe's Z offset from Homing / Z clearance - which in turn gives the intended true height.
Clearance before and after changes is not greatly affected. Z clearance height is true after changes, and before changes it is +/- probe Z offset.
I'm trying to see what you mean either way...:
Clearance after probing is not affected negatively, but it is beneficial.
If
+
probe.offset.z
( > 0 ):If
-
probe.offset.z
( < 0 ):See the diagram in my related issue #27294 :
The blue line represents where the Nozzle is when Z=0. As for the icon of the nozzle with the double white line and the word 'Home' represents where it is when Z is Home.
Let's take what you say if
probe.offset.z > (- Z_AFTER_PROBING)
, according to the diagram above:Homing will not bring the Z_AFTER_PROBING to the desired +10.00 above the bed. With the current logic, Z Offset +/positive gets subtracted, -/negative gets added (
zdest -= probe.offset.z
).This is represented in the Middle. Let's say you need a positive Z Offset of +10.00 in order for the Nozzle to meet the bed's surface, +10.00 gets subtracted from +10.00 of
Z_AFTER_PROBING
(assuming that is 10), so you're left 0.00 height at Home which is AT the bed surface, not above.The Left side represents a Z Offset of 0.00 (None/default). So homing may leave it +10 above the bed, but when Z=0 this will cause the Nozzle to go below the bed surface. That is why a positive Z Offset is needed, since it raises the Nozzle to the correct bed height.
The Right side represents the opposite, a negative Z Offset will bring the Home position +20 above the bed, since
probe.offset.z = -10.00; zdest = zdest - (-10.00);
.And since a negative Z Offset lowers the nozzle when Z=0 it goes an additional 10 below the already 10 below, so 20 below the bed (or -20).