Closed colcolcheese closed 1 year ago
tested
./buildroot/bin/opt_enable Z2_DRIVER_TYPE A4988 ./buildroot/bin/opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER ./buildroot/bin/opt_set INVERT_Z_DIR true
good 4b4d98d282f2760e760b9f2ccca8dcc8831f7f8d bad 3e9848f49c6565ea1c630c272e32e27b0858d85a
says commit d93aa0c38449bcbc38aeca7eac506297270546c8 introduced this issue.
but its not the whole story....
says commit d93aa0c introduced this issue.
That patch was pushed to fix the motion bug(s) reported in https://github.com/MarlinFirmware/Marlin/issues/25785
Looking into the code, and getting rather confused, but I think I see the issue
The code is correct, but some defines are missing.
when #define INVERT_Z_DIR true then this should also be set
same with INVERT_Z3_DIR and INVERT_Z4_DIR for when you have 3 or 4 Z's simply adding the line will fix the issue, but it should be done automatically
I purpose the following, which fixes it in my testing
diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h
index 7ea12f0493..855218ab37 100644
--- a/Marlin/src/inc/Conditionals_adv.h
+++ b/Marlin/src/inc/Conditionals_adv.h
@@ -875,6 +875,18 @@
#endif
// Multiple Z steppers
+#ifdef INVERT_Z_DIR
+ #if NUM_Z_STEPPERS > 3
+ #define INVERT_Z4_DIR INVERT_Z_DIR
+ #endif
+ #if NUM_Z_STEPPERS > 2
+ #define INVERT_Z3_DIR INVERT_Z_DIR
+ #endif
+ #if NUM_Z_STEPPERS > 1
+ #define INVERT_Z2_DIR INVERT_Z_DIR
+ #endif
+#endif
+
#if NUM_Z_STEPPERS < 4
#undef INVERT_Z4_VS_Z_DIR
#if NUM_Z_STEPPERS < 3
@colcolcheese can you try this on your system?
If it also fixes your issue, ill turn it into a PR to fix it for all.
The test was successful. Thanks for responding.
PR created, closing this as fixed. (as soon as its is committed)
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.
Bug Description
define INVERT_Z_DIR false => Z&Z2=right rotation
define INVERT_Z_DIR true => Z=left rotation Z2=right rotation
Version of Marlin Firmware
bugfix-2.1.x
Printer model
Don't forget to include
Configuration.h
andConfiguration_adv.h
.Additional information & file uploads
Marlin.zip