-
-
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
Drop DISABLE_Z_MIN_PROBE_ENDSTOP, clean up probe config #4842
Drop DISABLE_Z_MIN_PROBE_ENDSTOP, clean up probe config #4842
Conversation
286b269
to
f6dd3ad
Compare
f6dd3ad
to
e05af60
Compare
Did you stumble on the reason why this got added in the first place? I'm sure at the time, there was a good reason for it. But right now, I'm glad to see it gone! I wish we could do it without #undef's however! But the #undef's were already in that area of the code. You didn't add any extra #undef's. Quick Questions: Is it worth trying to remove all the #undef's in the code? My big problem with them is I don't have a good idea of the 'priority' (if any) that is followed. If there was some easy to understand hierarchy about when a #define was vulnerable to be #undef'ed that would help me. 2nd Quick Question: I think we could just be smarter on the #define's to not do them so we don't need to do an #undef later. Is that true? Is it a huge amount of work if that is true? |
For the BLTOUCH certain settings need to be applied. You can only redefine a setting if it is not already defined, and so undef is needed for that. It makes more sense for something like BLTOUCH to enforce its 3 or 4 required settings, which are otherwise obscure to new users. And we cannot sanity check certain types of settings, such as the servo angles, except to tell users to define them. This is prettty much what the Conditionals files are about. To ease the burden on end-users when one setting requires several others to be just so. |
In general, I have been moving towards getting better control over the specific order where things are defined, to ensure that things are set and/or overridden in the most controlled manner possible. It's the reason we have You'll notice that you can do something like I think, generally, the use of |
Note that the only reason I am able to add the "Make Z_MIN_PROBE_PIN override option available in Configuration.h" bullet item is because weeks ago I patched it to be overrideable in all the pins files. This isn't a general method that could apply for all pins, just those that get a similar treatment. |
Before I merge this, I might want to add a sanity check for My understanding is that it existed only because of the way the pin was being defined before, and it has become obsolete because we control that better now. |
Clean up probe configuration, reducing complexity somewhat.
DISABLE_Z_MIN_PROBE_ENDSTOP
entirely.Z_MIN_PROBE_PIN
unless usingZ_MIN_PROBE_ENDSTOP
.Z_MIN_PROBE_ENDSTOP
andZ_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
when no probe is selected.Z_MIN_PROBE_PIN
override option available inConfiguration.h
.endstops.cpp
- pre-filtered by sanity checking.Conditionals_LCD.h
(soon change toConditionals_pre.h
)