Fix G28 with non-BLTouch probes#14381
Merged
thinkyhead merged 2 commits intobugfix-2.0.xfrom Jun 24, 2019
unknown repository
Merged
Fix G28 with non-BLTouch probes#14381thinkyhead merged 2 commits intobugfix-2.0.xfrom unknown repository
thinkyhead merged 2 commits intobugfix-2.0.xfrom
unknown repository
Conversation
added 2 commits
June 23, 2019 15:40
bltouch.init can now be replaced by STOW_PROBE - and it is to be done before any movement takes place. Also, it should be done with all kinds of probes. They will be duly deployed in homeaxis() etc. bltouch.h is no longer needed.
This is the right place
Contributor
Right. And it's correct that way. |
thinkyhead
added a commit
that referenced
this pull request
Jun 26, 2019
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.
TESTED, can be MERGED but QUESTIONs (see below).
Part of the BLTOUCH cleanup. In preparation for later changes in motion.cpp.
Refer also to issue #14328.
A combination of two things prompted this change:
History: The
bltouch.init()call before homing was deemed necessary to bring the probe into a defined state before doing any movement. At that time,bltouch.init()was still causing the pin to down-up-down, which prompted moving it to the code place where z-homing would take place. There are actually other places which were missed in the hurry - so that's the first error. Then later on, the down-up-down was abandoned as it was considered an annoyance and thebltouch.init()could have been moved back to the beginning of the G28 - it only does a RESET and then a STOW anymore.But what about other kinds of probes? It is a good idea to STOW all kinds of probes before G28 goes moving all over the place (X, Y). It will be deployed in the lower level code before homing Z anyway.
And this also fixes the M401 problem #14328 (only applies to USES_Z_MIN_PROBE_ENDSTOP, separate pins for probe and ZMIN), where a deployed probe would be inadvertently stowed by the
bltouch.init()but leaving the endstops configured for the probe - which crashes into the bed (stowed probe).With this fix, all homing via G28 will unconditionally use the ZMIN endstop.
Is there a desire to have a M401 (deploy) set a mode where subsequent G28s, G34s(contains G28s) use the probe when homing instead of the Z-MIN endstop?
I don't really believe that. It can be done, but many more code changes and
HOMING_Z_WITH_PROBEwould have to be made a bool instead of #defined.Currently
#define HOMING_Z_WITH_PROBE (Z_HOME_DIR < 0 && !USES_Z_MIN_PROBE_ENDSTOP)limits homing with a probe to probes that are attached to the ZMIN pin.
Is this what was intended when a user connects BOTH the ZMIN switch AND the probe? The current logic then turns off
HOMING_Z_WITH_PROBEand homes with the ZMIN endstop switch.