-
-
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
Simplified endstop configuration #3065
Conversation
#define ENDSTOPPULLUP_XMAX | ||
#define ENDSTOPPULLUP_YMAX | ||
#define ENDSTOPPULLUP_ZMAX | ||
#endif | ||
#if DISABLED(DISABLE_MIN_ENDSTOPS) | ||
#if DISABLED(HAS_ENDSTOP_X_MIN) && DISABLED(HAS_ENDSTOP_Y_MIN) && DISABLED(HAS_ENDSTOP_Z_MIN) | ||
#define ENDSTOPPULLUP_XMIN | ||
#define ENDSTOPPULLUP_YMIN | ||
#define ENDSTOPPULLUP_ZMIN |
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 to be handled per endstop - not all together.
#if DISABLED(HAS_ENDSTOP_X_MAX)
#define ENDSTOPPULLUP_XMAX
#endif
...
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.
Good point!
Because of #define USE_X_MIN (PIN_EXISTS(X_MIN))
#define USE_X_MAX (PIN_EXISTS(X_MAX))
#define USE_Y_MIN (PIN_EXISTS(Y_MIN))
#define USE_Y_MAX (PIN_EXISTS(Y_MAX))
#define USE_Z_MIN (PIN_EXISTS(Z_MIN))
#define USE_Z_MAX (PIN_EXISTS(Z_MAX))
#define USE_Z2_MIN (PIN_EXISTS(Z2_MIN))
#define USE_Z2_MAX (PIN_EXISTS(Z2_MAX)) in |
Maybe you want to adopt something from here (5734d0e) |
Actually, I don't think this PR changes the behavior of |
dc1efad
to
1d9b754
Compare
Thanks. Looks very nice now. |
@Blue-Marlin I gave a little more thought to your question about how the endstops are polled, and a couple of things dawned:
|
2b8d68b
to
4395e2b
Compare
4395e2b
to
8f4d8bc
Compare
8f4d8bc
to
d2c325c
Compare
f7c2bba
to
9ad1164
Compare
A clever technique is used in Simplify configuration of Z2 endstops to choose which of the six endstop connectors (standard fare on all boards) is used for the Z2 endstop. The same technique could be used to set which endstop connector you are using for a particular function, perhaps simplifying the way that z probe and z endstop relationships are worked out. (Always looking for new ways to reduce the number of endstop, homing, probing, and probe options!) Then configuration might be done by assigning the named connector to the function (instead of assigning the function to the connector)… #define FUNC_ENDSTOP_MIN_X _XMIN_
#define FUNC_ENDSTOP_MAX_X _NONE_
#define FUNC_ENDSTOP_MIN_Y _YMIN_
#define FUNC_ENDSTOP_MAX_Y _NONE_
#define FUNC_ENDSTOP_MIN_Z _ZMIN_
#define FUNC_ENDSTOP_MAX_Z _NONE_
#define FUNC_INDUCTIVE_SENSOR _XMAX_ // Set to _NONE_ for no inductive sensor
#define FUNC_PROBE_SWITCH _ZMAX_ // Set to _NONE_ for no servo probe |
8f453af
to
b79b38b
Compare
I've changed the name of the individual endstop flags to indicate that we are referring to the plug connectors and not to "endstops" per se. |
b79b38b
to
bcbe731
Compare
bcbe731
to
9590359
Compare
9590359
to
2b4c426
Compare
One issue we constantly see is users failing to enable
DISABLE_MAX_ENDSTOPS
orDISABLE_MIN_ENDSTOPS
, causing them to scratch their heads and complain in the issue queue. Instead of adding more stern comments to the configuration files, this solves the problem by adding individual flags to specify which endstops are connected. Sanity checks have been added to warn users about these deprecated configuration options.As an adjunct to this, Z2 endstop configuration is simplified. Instead of setting a literal PIN number, #undeffing the endstop flag, and setting the inverting, instead you just specify which axis to use.
DISABLE_M(IN|AX)_ENDSTOPS
and use individual endstop flags insteadDISABLE_[XYZ]_ENDSTOPS
This PR is posted here as a conceptual example, not necessarily bound for the next RC release, but something to discuss and play around with.
I've tried to get the endstops correct in the example configurations, but a few of these configurations had an improper setting for
DISABLE_MAX_ENDSTOPS
. Please confirm whether these appear correct for each machine.I also want to ensure that these tests are equivalent for this purpose: