Simplify configuration of Z2 endstops
This commit is contained in:
parent
e5771346a4
commit
868eebfdee
|
@ -503,6 +503,47 @@
|
|||
|
||||
#define ARRAY_BY_EXTRUDERS1(v1) ARRAY_BY_EXTRUDERS(v1, v1, v1, v1)
|
||||
|
||||
/**
|
||||
* Z_DUAL_ENDSTOPS endstop reassignment
|
||||
*/
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define _XMIN_ 100
|
||||
#define _YMIN_ 200
|
||||
#define _ZMIN_ 300
|
||||
#define _XMAX_ 101
|
||||
#define _YMAX_ 201
|
||||
#define _ZMAX_ 301
|
||||
const bool Z2_MAX_ENDSTOP_INVERTING =
|
||||
#if Z2_USE_ENDSTOP == _XMAX_
|
||||
X_MAX_ENDSTOP_INVERTING
|
||||
#define Z2_MAX_PIN X_MAX_PIN
|
||||
#undef USE_XMAX_PLUG
|
||||
#elif Z2_USE_ENDSTOP == _YMAX_
|
||||
Y_MAX_ENDSTOP_INVERTING
|
||||
#define Z2_MAX_PIN Y_MAX_PIN
|
||||
#undef USE_YMAX_PLUG
|
||||
#elif Z2_USE_ENDSTOP == _ZMAX_
|
||||
Z_MAX_ENDSTOP_INVERTING
|
||||
#define Z2_MAX_PIN Z_MAX_PIN
|
||||
#undef USE_ZMAX_PLUG
|
||||
#elif Z2_USE_ENDSTOP == _XMIN_
|
||||
X_MIN_ENDSTOP_INVERTING
|
||||
#define Z2_MAX_PIN X_MIN_PIN
|
||||
#undef USE_XMIN_PLUG
|
||||
#elif Z2_USE_ENDSTOP == _YMIN_
|
||||
Y_MIN_ENDSTOP_INVERTING
|
||||
#define Z2_MAX_PIN Y_MIN_PIN
|
||||
#undef USE_YMIN_PLUG
|
||||
#elif Z2_USE_ENDSTOP == _ZMIN_
|
||||
Z_MIN_ENDSTOP_INVERTING
|
||||
#define Z2_MAX_PIN Z_MIN_PIN
|
||||
#undef USE_ZMIN_PLUG
|
||||
#else
|
||||
0
|
||||
#endif
|
||||
;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Shorthand for pin tests, used wherever needed
|
||||
*/
|
||||
|
|
|
@ -201,9 +201,7 @@
|
|||
//#define Z_DUAL_ENDSTOPS
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
|
||||
const bool Z2_MAX_ENDSTOP_INVERTING = false;
|
||||
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#endif
|
||||
|
||||
#endif // Z_DUAL_STEPPER_DRIVERS
|
||||
|
|
|
@ -469,6 +469,8 @@
|
|||
#error FILAMENT_SENSOR is deprecated. Use FILAMENT_WIDTH_SENSOR instead.
|
||||
#elif defined(DISABLE_MAX_ENDSTOPS) || defined(DISABLE_MIN_ENDSTOPS)
|
||||
#error DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated - set USE_*_ENDSTOP flags instead
|
||||
#elif ENABLED(Z_DUAL_ENDSTOPS) && !defined(Z2_USE_ENDSTOP)
|
||||
#error Z_DUAL_ENDSTOPS settings are simplified. Just set Z2_USE_ENDSTOP to the endstop you want to repurpose for Z2
|
||||
#endif
|
||||
|
||||
#endif //SANITYCHECK_H
|
||||
|
|
|
@ -201,9 +201,7 @@
|
|||
//#define Z_DUAL_ENDSTOPS
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
|
||||
const bool Z2_MAX_ENDSTOP_INVERTING = false;
|
||||
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#endif
|
||||
|
||||
#endif // Z_DUAL_STEPPER_DRIVERS
|
||||
|
|
|
@ -201,9 +201,7 @@
|
|||
//#define Z_DUAL_ENDSTOPS
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
|
||||
const bool Z2_MAX_ENDSTOP_INVERTING = false;
|
||||
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#endif
|
||||
|
||||
#endif // Z_DUAL_STEPPER_DRIVERS
|
||||
|
|
|
@ -201,9 +201,7 @@
|
|||
//#define Z_DUAL_ENDSTOPS
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
|
||||
const bool Z2_MAX_ENDSTOP_INVERTING = false;
|
||||
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#endif
|
||||
|
||||
#endif // Z_DUAL_STEPPER_DRIVERS
|
||||
|
|
|
@ -207,9 +207,7 @@
|
|||
//#define Z_DUAL_ENDSTOPS
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
|
||||
const bool Z2_MAX_ENDSTOP_INVERTING = false;
|
||||
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#endif
|
||||
|
||||
#endif // Z_DUAL_STEPPER_DRIVERS
|
||||
|
|
|
@ -201,9 +201,7 @@
|
|||
//#define Z_DUAL_ENDSTOPS
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
|
||||
const bool Z2_MAX_ENDSTOP_INVERTING = false;
|
||||
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#endif
|
||||
|
||||
#endif // Z_DUAL_STEPPER_DRIVERS
|
||||
|
|
|
@ -201,9 +201,7 @@
|
|||
//#define Z_DUAL_ENDSTOPS
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
|
||||
const bool Z2_MAX_ENDSTOP_INVERTING = false;
|
||||
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#endif
|
||||
|
||||
#endif // Z_DUAL_STEPPER_DRIVERS
|
||||
|
|
|
@ -209,9 +209,7 @@
|
|||
//#define Z_DUAL_ENDSTOPS
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
|
||||
const bool Z2_MAX_ENDSTOP_INVERTING = false;
|
||||
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#endif
|
||||
|
||||
#endif // Z_DUAL_STEPPER_DRIVERS
|
||||
|
|
|
@ -201,9 +201,7 @@
|
|||
//#define Z_DUAL_ENDSTOPS
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
|
||||
const bool Z2_MAX_ENDSTOP_INVERTING = false;
|
||||
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#endif
|
||||
|
||||
#endif // Z_DUAL_STEPPER_DRIVERS
|
||||
|
|
|
@ -201,9 +201,7 @@
|
|||
//#define Z_DUAL_ENDSTOPS
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
|
||||
const bool Z2_MAX_ENDSTOP_INVERTING = false;
|
||||
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#endif
|
||||
|
||||
#endif // Z_DUAL_STEPPER_DRIVERS
|
||||
|
|
|
@ -201,9 +201,7 @@
|
|||
//#define Z_DUAL_ENDSTOPS
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
|
||||
const bool Z2_MAX_ENDSTOP_INVERTING = false;
|
||||
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#endif
|
||||
|
||||
#endif // Z_DUAL_STEPPER_DRIVERS
|
||||
|
|
|
@ -201,9 +201,7 @@
|
|||
//#define Z_DUAL_ENDSTOPS
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
|
||||
const bool Z2_MAX_ENDSTOP_INVERTING = false;
|
||||
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#endif
|
||||
|
||||
#endif // Z_DUAL_STEPPER_DRIVERS
|
||||
|
|
|
@ -206,9 +206,7 @@
|
|||
//#define Z_DUAL_ENDSTOPS
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
|
||||
const bool Z2_MAX_ENDSTOP_INVERTING = false;
|
||||
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#endif
|
||||
|
||||
#endif // Z_DUAL_STEPPER_DRIVERS
|
||||
|
|
|
@ -201,9 +201,7 @@
|
|||
//#define Z_DUAL_ENDSTOPS
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
|
||||
const bool Z2_MAX_ENDSTOP_INVERTING = false;
|
||||
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#endif
|
||||
|
||||
#endif // Z_DUAL_STEPPER_DRIVERS
|
||||
|
|
|
@ -201,9 +201,7 @@
|
|||
//#define Z_DUAL_ENDSTOPS
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
|
||||
const bool Z2_MAX_ENDSTOP_INVERTING = false;
|
||||
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#endif
|
||||
|
||||
#endif // Z_DUAL_STEPPER_DRIVERS
|
||||
|
|
|
@ -201,9 +201,7 @@
|
|||
//#define Z_DUAL_ENDSTOPS
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
|
||||
const bool Z2_MAX_ENDSTOP_INVERTING = false;
|
||||
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
|
||||
#define Z2_USE_ENDSTOP _XMAX_
|
||||
#endif
|
||||
|
||||
#endif // Z_DUAL_STEPPER_DRIVERS
|
||||
|
|
Loading…
Reference in a new issue