From 9206c0e8699dbb934db76669addd74ac00391a00 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 5 Jun 2019 21:32:10 -0500 Subject: [PATCH] Use limit switch overrides --- Marlin/src/pins/pins_AZTEEG_X3.h | 6 +-- Marlin/src/pins/pins_AZTEEG_X3_PRO.h | 56 +++++++++++---------------- Marlin/src/pins/pins_BQ_ZUM_MEGA_3D.h | 8 ++-- Marlin/src/pins/pins_GT2560_V3.h | 30 +++++++++++--- Marlin/src/pins/pins_GT2560_V3_MC2.h | 11 +----- Marlin/src/pins/pins_MELZI_CREALITY.h | 3 +- Marlin/src/pins/pins_RAMPS.h | 36 ++++++++++------- Marlin/src/pins/pins_RAMPS_DAGOMA.h | 22 ++++------- Marlin/src/pins/pins_TRONXY_V3_1_0.h | 8 ++-- 9 files changed, 90 insertions(+), 90 deletions(-) diff --git a/Marlin/src/pins/pins_AZTEEG_X3.h b/Marlin/src/pins/pins_AZTEEG_X3.h index fe5cb627a..e7076cba9 100644 --- a/Marlin/src/pins/pins_AZTEEG_X3.h +++ b/Marlin/src/pins/pins_AZTEEG_X3.h @@ -37,16 +37,14 @@ #endif #define BOARD_NAME "Azteeg X3" -#include "pins_RAMPS_13.h" - // // Servos // -#undef SERVO0_PIN -#undef SERVO1_PIN #define SERVO0_PIN 44 // SERVO1 port #define SERVO1_PIN 55 // SERVO2 port +#include "pins_RAMPS_13.h" + // // LCD / Controller // diff --git a/Marlin/src/pins/pins_AZTEEG_X3_PRO.h b/Marlin/src/pins/pins_AZTEEG_X3_PRO.h index 55ee39f84..bae70258e 100644 --- a/Marlin/src/pins/pins_AZTEEG_X3_PRO.h +++ b/Marlin/src/pins/pins_AZTEEG_X3_PRO.h @@ -37,14 +37,33 @@ // // RAMPS pins overrides // -#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) - #define CASE_LIGHT_PIN 44 -#endif + +// +// Servos +// +// Tested this pin with bed leveling on a Delta with 1 servo. +// Physical wire attachment on EXT1: GND, 5V, D47. +// +#define SERVO0_PIN 47 + +// +// Limit Switches +// +#define X_STOP_PIN 3 +#define Y_STOP_PIN 14 +#define Z_STOP_PIN 18 #ifndef FAN_PIN #define FAN_PIN 6 #endif +#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) + #define CASE_LIGHT_PIN 44 +#endif + +// +// Import RAMPS 1.4 pins +// #include "pins_RAMPS.h" // DIGIPOT slave addresses @@ -55,37 +74,6 @@ #define DIGIPOT_I2C_ADDRESS_B 0x2E // unshifted slave address for second DIGIPOT 0x2E (0x5C <- 0x2E << 1) #endif -// -// Servos -// -// Tested this pin with bed leveling on a Delta with 1 servo. -// Physical wire attachment on EXT1: GND, 5V, D47. -// -#undef SERVO0_PIN -#define SERVO0_PIN 47 - -// -// Limit Switches -// -// Swap the MIN and MAX endstop pins because the X3 Pro comes with only -// MIN endstop pin headers soldered onto the board. -// -#if ENABLED(DELTA) - #undef X_MIN_PIN - #undef X_MAX_PIN - #undef Y_MIN_PIN - #undef Y_MAX_PIN - #undef Z_MIN_PIN - #undef Z_MAX_PIN - - #define X_MIN_PIN 2 - #define X_MAX_PIN 3 - #define Y_MIN_PIN 15 - #define Y_MAX_PIN 14 - #define Z_MIN_PIN 19 - #define Z_MAX_PIN 18 -#endif - // // Z Probe (when not Z_MIN_PIN) // diff --git a/Marlin/src/pins/pins_BQ_ZUM_MEGA_3D.h b/Marlin/src/pins/pins_BQ_ZUM_MEGA_3D.h index c09e946f5..93862c285 100644 --- a/Marlin/src/pins/pins_BQ_ZUM_MEGA_3D.h +++ b/Marlin/src/pins/pins_BQ_ZUM_MEGA_3D.h @@ -53,14 +53,16 @@ #define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM #define SPINDLE_DIR_PIN 42 -#include "pins_RAMPS_13.h" - // // Limit Switches // -#undef X_MAX_PIN #define X_MAX_PIN 79 // 2 +// +// Import RAMPS 1.3 pins +// +#include "pins_RAMPS_13.h" + // // Z Probe (when not Z_MIN_PIN) // diff --git a/Marlin/src/pins/pins_GT2560_V3.h b/Marlin/src/pins/pins_GT2560_V3.h index 9ea31965c..672cade57 100644 --- a/Marlin/src/pins/pins_GT2560_V3.h +++ b/Marlin/src/pins/pins_GT2560_V3.h @@ -40,12 +40,30 @@ // // Limit Switches // -#define X_MIN_PIN 24 -#define X_MAX_PIN 22 -#define Y_MIN_PIN 28 -#define Y_MAX_PIN 26 -#define Z_MIN_PIN 30 -#define Z_MAX_PIN 32 +#ifndef X_STOP_PIN + #ifndef X_MIN_PIN + #define X_MIN_PIN 24 + #endif + #ifndef X_MAX_PIN + #define X_MAX_PIN 22 + #endif +#endif +#ifndef Y_STOP_PIN + #ifndef Y_MIN_PIN + #define Y_MIN_PIN 28 + #endif + #ifndef Y_MAX_PIN + #define Y_MAX_PIN 26 + #endif +#endif +#ifndef Z_STOP_PIN + #ifndef Z_MIN_PIN + #define Z_MIN_PIN 30 + #endif + #ifndef Z_MAX_PIN + #define Z_MAX_PIN 32 + #endif +#endif // // Z Probe (when not Z_MIN_PIN) diff --git a/Marlin/src/pins/pins_GT2560_V3_MC2.h b/Marlin/src/pins/pins_GT2560_V3_MC2.h index 42691f416..ab2b648f2 100644 --- a/Marlin/src/pins/pins_GT2560_V3_MC2.h +++ b/Marlin/src/pins/pins_GT2560_V3_MC2.h @@ -26,16 +26,9 @@ #define BOARD_NAME "GT2560 V3.0 (MC2)" -#include "pins_GT2560_V3.h" - -#undef X_MIN_PIN #define X_MIN_PIN 22 - -#undef X_MAX_PIN #define X_MAX_PIN 24 - -#undef Y_MIN_PIN #define Y_MIN_PIN 26 - -#undef Y_MAX_PIN #define Y_MAX_PIN 28 + +#include "pins_GT2560_V3.h" diff --git a/Marlin/src/pins/pins_MELZI_CREALITY.h b/Marlin/src/pins/pins_MELZI_CREALITY.h index 9ab40187e..0799d73e2 100644 --- a/Marlin/src/pins/pins_MELZI_CREALITY.h +++ b/Marlin/src/pins/pins_MELZI_CREALITY.h @@ -45,13 +45,12 @@ #undef LCD_PINS_D5 #undef LCD_PINS_D6 #undef LCD_PINS_D7 -#undef FIL_RUNOUT_PIN +#undef FIL_RUNOUT_PIN // Uses Beeper/LED Pin Pulled to GND #define LCD_SDSS 31 // Smart Controller SD card reader (rather than the Melzi) #define LCD_PINS_RS 28 // ST9720 CS #define LCD_PINS_ENABLE 17 // ST9720 DAT #define LCD_PINS_D4 30 // ST9720 CLK -#define FIL_RUNOUT_PIN -1 // Uses Beeper/LED Pin Pulled to GND #if DISABLED(SPEAKER) && ENABLED(BLTOUCH) #define SERVO0_PIN 27 diff --git a/Marlin/src/pins/pins_RAMPS.h b/Marlin/src/pins/pins_RAMPS.h index 7c50d4aa7..dfedaa8d8 100644 --- a/Marlin/src/pins/pins_RAMPS.h +++ b/Marlin/src/pins/pins_RAMPS.h @@ -83,23 +83,29 @@ // // Limit Switches // -#ifndef X_MIN_PIN - #define X_MIN_PIN 3 +#ifndef X_STOP_PIN + #ifndef X_MIN_PIN + #define X_MIN_PIN 3 + #endif + #ifndef X_MAX_PIN + #define X_MAX_PIN 2 + #endif #endif -#ifndef X_MAX_PIN - #define X_MAX_PIN 2 +#ifndef Y_STOP_PIN + #ifndef Y_MIN_PIN + #define Y_MIN_PIN 14 + #endif + #ifndef Y_MAX_PIN + #define Y_MAX_PIN 15 + #endif #endif -#ifndef Y_MIN_PIN - #define Y_MIN_PIN 14 -#endif -#ifndef Y_MAX_PIN - #define Y_MAX_PIN 15 -#endif -#ifndef Z_MIN_PIN - #define Z_MIN_PIN 18 -#endif -#ifndef Z_MAX_PIN - #define Z_MAX_PIN 19 +#ifndef Z_STOP_PIN + #ifndef Z_MIN_PIN + #define Z_MIN_PIN 18 + #endif + #ifndef Z_MAX_PIN + #define Z_MAX_PIN 19 + #endif #endif // diff --git a/Marlin/src/pins/pins_RAMPS_DAGOMA.h b/Marlin/src/pins/pins_RAMPS_DAGOMA.h index 8f28b75ae..4c251e384 100644 --- a/Marlin/src/pins/pins_RAMPS_DAGOMA.h +++ b/Marlin/src/pins/pins_RAMPS_DAGOMA.h @@ -26,20 +26,14 @@ #define BOARD_NAME "Dagoma3D F5 RAMPS" -#ifdef E0_AUTO_FAN_PIN - #undef E0_AUTO_FAN_PIN -#endif +#define X_STOP_PIN 2 +#define Y_STOP_PIN 3 +#define Z_STOP_PIN 15 +#define FIL_RUNOUT_PIN 39 -#define E0_AUTO_FAN_PIN 7 - -#define X_MAX_PIN -1 -#define X_MIN_PIN 2 -#define Y_MAX_PIN 3 -#define Y_MIN_MIN -1 -#define Z_MAX_PIN -1 -#define Z_MIN_PIN 15 -#define FILRUNOUT_PIN 39 -#define MOSFET_D_PIN -1 +#define ORIG_E0_AUTO_FAN_PIN 7 +// +// Import RAMPS 1.4 pins +// #include "pins_RAMPS.h" - diff --git a/Marlin/src/pins/pins_TRONXY_V3_1_0.h b/Marlin/src/pins/pins_TRONXY_V3_1_0.h index 91fabb329..8892065c1 100644 --- a/Marlin/src/pins/pins_TRONXY_V3_1_0.h +++ b/Marlin/src/pins/pins_TRONXY_V3_1_0.h @@ -34,14 +34,16 @@ #define BOARD_NAME "TRONXY-V3-1.0" -#include "pins_RAMPS.h" - // // Servos // -#undef SERVO1_PIN #define SERVO1_PIN 12 // 2560 PIN 25/PB6 +// +// Import RAMPS 1.4 pins +// +#include "pins_RAMPS.h" + /** * @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ *