Browse Source

Simplify configuration of Z2 endstops

pull/1/head
Scott Lahteine 9 years ago
parent
commit
868eebfdee
  1. 41
      Marlin/Conditionals.h
  2. 4
      Marlin/Configuration_adv.h
  3. 2
      Marlin/SanityCheck.h
  4. 4
      Marlin/example_configurations/Felix/Configuration_adv.h
  5. 4
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  6. 4
      Marlin/example_configurations/Hephestos_2/Configuration_adv.h
  7. 4
      Marlin/example_configurations/K8200/Configuration_adv.h
  8. 4
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  9. 4
      Marlin/example_configurations/SCARA/Configuration_adv.h
  10. 4
      Marlin/example_configurations/TAZ4/Configuration_adv.h
  11. 4
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  12. 4
      Marlin/example_configurations/delta/biv2.5/Configuration_adv.h
  13. 4
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  14. 4
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  15. 4
      Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h
  16. 4
      Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h
  17. 4
      Marlin/example_configurations/makibox/Configuration_adv.h
  18. 4
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h

41
Marlin/Conditionals.h

@ -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
*/

4
Marlin/Configuration_adv.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

2
Marlin/SanityCheck.h

@ -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

4
Marlin/example_configurations/Felix/Configuration_adv.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

4
Marlin/example_configurations/Hephestos/Configuration_adv.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

4
Marlin/example_configurations/Hephestos_2/Configuration_adv.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

4
Marlin/example_configurations/K8200/Configuration_adv.h

@ -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

4
Marlin/example_configurations/RigidBot/Configuration_adv.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

4
Marlin/example_configurations/SCARA/Configuration_adv.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

4
Marlin/example_configurations/TAZ4/Configuration_adv.h

@ -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

4
Marlin/example_configurations/WITBOX/Configuration_adv.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

4
Marlin/example_configurations/delta/biv2.5/Configuration_adv.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

4
Marlin/example_configurations/delta/generic/Configuration_adv.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

4
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.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

4
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h

@ -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

4
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.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

4
Marlin/example_configurations/makibox/Configuration_adv.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

4
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.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

Loading…
Cancel
Save