-
-
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
[BUG] Dual endstops Z. Will not compile #22864
Comments
These are made up and do not do anything... |
The issue is the auto assignment of endstop pins in Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h This will let you compile. but is not a complete solution. (Ie it needs work) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
index ab0a7dd962..7e391ea7c1 100644
--- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
+++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
@@ -72,7 +72,7 @@
#else
#define X_MIN_PIN E0_DIAG_PIN // E0DET
#endif
-#elif EITHER(X_DUAL_ENDSTOPS, DUAL_X_CARRIAGE)
+#elif ANY(X_DUAL_ENDSTOPS, DUAL_X_CARRIAGE, Z_MULTI_ENDSTOPS)
#ifndef X_MIN_PIN
#define X_MIN_PIN X_DIAG_PIN // X-STOP
#endif
@@ -90,7 +90,7 @@
#else
#define Y_MIN_PIN E1_DIAG_PIN // E1DET
#endif
-#elif ENABLED(Y_DUAL_ENDSTOPS)
+#elif EITHER(Y_DUAL_ENDSTOPS, Z_MULTI_ENDSTOPS)
#ifndef Y_MIN_PIN
#define Y_MIN_PIN Y_DIAG_PIN // Y-STOP
#endif
@@ -108,7 +108,7 @@
#else
#define Z_MIN_PIN E2_DIAG_PIN // PWRDET
#endif
-#elif ENABLED(Z_MULTI_ENDSTOPS)
+#elif ENABLED(Z_MULTI_ENDSTOPS) && (Z2_USE_ENDSTOP == _ZMAX_|| Z2_USE_ENDSTOP == _ZMIN_)
#ifndef Z_MIN_PIN
#define Z_MIN_PIN Z_DIAG_PIN // Z-STOP
#endif
|
thankyou it complied, Ill be heading to the workshop tomorrow to install the new board in the Cnc and test it.. |
Created a PR with a much nicer patch to fix this properly. |
PR's have been merged. Closing |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Did you test the latest
bugfix-2.0.x
code?Yes, and the problem still exists.
Bug Description
I have a Mpcnc Lowrider 2 and I am using dual Y and Z steppers with dual endstops. home to Z_max
When I define the Z_MULTI_ENDSTOPS in the configuration_adv.h it will not compile anymore.
I have defined in the configuration.h
#define USE_XMIN_PLUG
#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
#define USE_XMAX_PLUG
#define USE_YMAX_PLUG
#define USE_ZMAX_PLUG
#define USE_Y2MAX_PLUG
#define USE_Z2MAX_PLUG
#define USE_Y2MIN_PLUG
#define USE_Z2MIN_PLUG
#define NUM_Z_STEPPER_DRIVERS 2 // (1-4) Z options change based on how many
#if NUM_Z_STEPPER_DRIVERS > 1
// Enable if Z motor direction signals are the opposite of Z1
#define INVERT_Z2_VS_Z_DIR
//#define INVERT_Z3_VS_Z_DIR
//#define INVERT_Z4_VS_Z_DIR
#define Z_MULTI_ENDSTOPS
#if ENABLED(Z_MULTI_ENDSTOPS)
#define Z2_USE_ENDSTOP XMAX
#define Z2_ENDSTOP_ADJUSTMENT 0
Bug Timeline
as of 30_09.21
Expected behavior
enable
Actual behavior
will not compile.
from Marlin\src\module\endstops.cpp:27:
Marlin\src\module\endstops.cpp: In static member function 'static void Endstops::update()':
Marlin\src\module\endstops.cpp:703:32: error: 'Z2_MIN' was not declared in this scope; did you mean 'Y2_MIN'?
703 | COPY_LIVE_STATE(Z_MIN, Z2_MIN);
in enstops.h
_ES_ITEM(HAS_Y2_MAX, Y2_MAX) has no value
Steps to Reproduce
uncomment #define Z_MULTI_ENDSTOPS
add Y2 and X2 endstops to configuration.h
Version of Marlin Firmware
define CONFIGURATION_ADV_H_VERSION 02000902
Printer model
Mpcnc Lowrider 2
Electronics
bigtreetech octopus
Add-ons
No response
Bed Leveling
No response
Your Slicer
Other (explain below)
Host Software
Other (explain below)
Additional information & file uploads
Marlin-bugfix-2.0.x.zip
The text was updated successfully, but these errors were encountered: