From b206f70693c68494b15451518062e19f31a9e019 Mon Sep 17 00:00:00 2001 From: Jeff Eberl Date: Sat, 14 Oct 2017 06:18:09 -0600 Subject: [PATCH 1/5] Split the software endstop capability by axis. --- Marlin/Configuration.h | 24 +++++++++++++++++-- Marlin/src/inc/Conditionals_post.h | 12 +++++++++- Marlin/src/inc/SanityCheck.h | 19 +++++++++++++++ Marlin/src/lcd/ultralcd.cpp | 38 ++++++++++++++++++++++-------- Marlin/src/module/motion.cpp | 35 +++++++++++++-------------- 5 files changed, 97 insertions(+), 31 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 608fbc139..74867fb4d 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -785,10 +785,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 200 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 6619a3bb8..9b3bb5928 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -793,7 +793,17 @@ #define HEATER_IDLE_HANDLER (ENABLED(ADVANCED_PAUSE_FEATURE) || ENABLED(PROBING_HEATERS_OFF)) /** - * Delta radius/rod trimmers/angle trimmers + * Only constrain Z on DELTA / SCARA machines + */ + #if IS_KINEMATIC + #undef MIN_SOFTWARE_ENDSTOP_X + #undef MIN_SOFTWARE_ENDSTOP_Y + #undef MAX_SOFTWARE_ENDSTOP_X + #undef MAX_SOFTWARE_ENDSTOP_Y + #endif + + /** + * Delta endstops, radius/rod trimmers, angle trimmers */ #if ENABLED(DELTA) #ifndef DELTA_CALIBRATION_RADIUS diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index b05e3e603..d53955706 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -254,6 +254,25 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds ([XY]_MIN_POS, [XY]_MAX_POS) are too narrow to contain [XY]_BED_SIZE."); +/** + * Granular software endstops (Marlin >= 1.1.7) + */ +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) && DISABLED(MIN_SOFTWARE_ENDSTOP_Z) + #if IS_KINEMATIC + #error "MIN_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MIN_SOFTWARE_ENDSTOP_Z." + #elif DISABLED(MIN_SOFTWARE_ENDSTOP_X) && DISABLED(MIN_SOFTWARE_ENDSTOP_Y) + #error "MIN_SOFTWARE_ENDSTOPS requires at least one of the MIN_SOFTWARE_ENDSTOP_[XYZ] options." + #endif +#endif + +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) && DISABLED(MAX_SOFTWARE_ENDSTOP_Z) + #if IS_KINEMATIC + #error "MAX_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MAX_SOFTWARE_ENDSTOP_Z." + #elif DISABLED(MAX_SOFTWARE_ENDSTOP_X) && DISABLED(MAX_SOFTWARE_ENDSTOP_Y) + #error "MAX_SOFTWARE_ENDSTOPS requires at least one of the MAX_SOFTWARE_ENDSTOP_[XYZ] options." + #endif +#endif + /** * Progress Bar */ diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index 3931a8f48..dc9921f1d 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -2834,17 +2834,35 @@ void kill_screen(const char* lcd_msg) { float min = current_position[axis] - 1000, max = current_position[axis] + 1000; - #if HAS_SOFTWARE_ENDSTOPS - // Limit to software endstops, if enabled - if (soft_endstops_enabled) { - #if ENABLED(MIN_SOFTWARE_ENDSTOPS) - min = soft_endstop_min[axis]; - #endif - #if ENABLED(MAX_SOFTWARE_ENDSTOPS) - max = soft_endstop_max[axis]; - #endif + // Limit to software endstops, if enabled + #if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) + if (soft_endstops_enabled) switch (axis) { + case X_AXIS: + #if ENABLED(MIN_SOFTWARE_ENDSTOP_X) + min = soft_endstop_min[X_AXIS]; + #endif + #if ENABLED(MAX_SOFTWARE_ENDSTOP_X) + max = soft_endstop_max[X_AXIS]; + #endif + break; + case Y_AXIS: + #if ENABLED(MIN_SOFTWARE_ENDSTOP_Y) + min = soft_endstop_min[Y_AXIS]; + #endif + #if ENABLED(MAX_SOFTWARE_ENDSTOP_Y) + max = soft_endstop_max[Y_AXIS]; + #endif + break; + case Z_AXIS: + #if ENABLED(MIN_SOFTWARE_ENDSTOP_Z) + min = soft_endstop_min[Z_AXIS]; + #endif + #if ENABLED(MAX_SOFTWARE_ENDSTOP_Z) + max = soft_endstop_max[Z_AXIS]; + #endif + break; } - #endif + #endif // MIN_SOFTWARE_ENDSTOPS || MAX_SOFTWARE_ENDSTOPS // Delta limits XY based on the current offset from center // This assumes the center is 0,0 diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index ecc3f8bf9..26620be8f 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -456,29 +456,28 @@ float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS }, /** * Constrain the given coordinates to the software endstops. + * + * NOTE: This will only apply to Z on DELTA and SCARA. XY is + * constrained to a circle on these kinematic systems. */ - - // NOTE: This makes no sense for delta beds other than Z-axis. - // For delta the X/Y would need to be clamped at - // DELTA_PRINTABLE_RADIUS from center of bed, but delta - // now enforces is_position_reachable for X/Y regardless - // of HAS_SOFTWARE_ENDSTOPS, so that enforcement would be - // redundant here. - void clamp_to_software_endstops(float target[XYZ]) { if (!soft_endstops_enabled) return; - #if ENABLED(MIN_SOFTWARE_ENDSTOPS) - #if DISABLED(DELTA) - NOLESS(target[X_AXIS], soft_endstop_min[X_AXIS]); - NOLESS(target[Y_AXIS], soft_endstop_min[Y_AXIS]); - #endif + #if ENABLED(MIN_SOFTWARE_ENDSTOP_X) + NOLESS(target[X_AXIS], soft_endstop_min[X_AXIS]); + #endif + #if ENABLED(MIN_SOFTWARE_ENDSTOP_Y) + NOLESS(target[Y_AXIS], soft_endstop_min[Y_AXIS]); + #endif + #if ENABLED(MIN_SOFTWARE_ENDSTOP_Z) NOLESS(target[Z_AXIS], soft_endstop_min[Z_AXIS]); #endif - #if ENABLED(MAX_SOFTWARE_ENDSTOPS) - #if DISABLED(DELTA) - NOMORE(target[X_AXIS], soft_endstop_max[X_AXIS]); - NOMORE(target[Y_AXIS], soft_endstop_max[Y_AXIS]); - #endif + #if ENABLED(MAX_SOFTWARE_ENDSTOP_X) + NOMORE(target[X_AXIS], soft_endstop_max[X_AXIS]); + #endif + #if ENABLED(MAX_SOFTWARE_ENDSTOP_Y) + NOMORE(target[Y_AXIS], soft_endstop_max[Y_AXIS]); + #endif + #if ENABLED(MAX_SOFTWARE_ENDSTOP_Z) NOMORE(target[Z_AXIS], soft_endstop_max[Z_AXIS]); #endif } From d3e5a22a5d85bbebcc115330177aa3e1f40d0059 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 14 Oct 2017 16:51:47 -0500 Subject: [PATCH 2/5] Add MIN_SOFTWARE_ENDSTOP_[XYZ] to example configs --- Marlin/src/config/default/Configuration.h | 24 +++++++++++++++++-- .../AlephObjects/TAZ4/Configuration.h | 24 +++++++++++++++++-- .../AliExpress/CL-260/Configuration.h | 24 +++++++++++++++++-- .../config/examples/Anet/A6/Configuration.h | 24 +++++++++++++++++-- .../config/examples/Anet/A8/Configuration.h | 24 +++++++++++++++++-- .../examples/BQ/Hephestos/Configuration.h | 24 +++++++++++++++++-- .../examples/BQ/Hephestos_2/Configuration.h | 24 +++++++++++++++++-- .../config/examples/BQ/WITBOX/Configuration.h | 24 +++++++++++++++++-- .../config/examples/Cartesio/Configuration.h | 24 +++++++++++++++++-- .../examples/Creality/CR-10/Configuration.h | 24 +++++++++++++++++-- .../src/config/examples/Felix/Configuration.h | 24 +++++++++++++++++-- .../examples/Felix/DUAL/Configuration.h | 24 +++++++++++++++++-- .../Folger Tech/i3-2020/Configuration.h | 24 +++++++++++++++++-- .../examples/Geeetech/GT2560/Configuration.h | 24 +++++++++++++++++-- .../Geeetech/I3_Pro_X-GT2560/Configuration.h | 24 +++++++++++++++++-- .../examples/Infitary/i3-M508/Configuration.h | 24 +++++++++++++++++-- .../examples/Malyan/M150/Configuration.h | 24 +++++++++++++++++-- .../config/examples/Mks/Sbase/Configuration.h | 24 +++++++++++++++++-- .../RepRapWorld/Megatronics/Configuration.h | 24 +++++++++++++++++-- .../config/examples/RigidBot/Configuration.h | 24 +++++++++++++++++-- .../src/config/examples/SCARA/Configuration.h | 24 +++++++++++++++++-- .../examples/Sanguinololu/Configuration.h | 24 +++++++++++++++++-- .../config/examples/TinyBoy2/Configuration.h | 24 +++++++++++++++++-- .../examples/Velleman/K8200/Configuration.h | 24 +++++++++++++++++-- .../examples/Velleman/K8400/Configuration.h | 24 +++++++++++++++++-- .../Velleman/K8400/Dual-head/Configuration.h | 24 +++++++++++++++++-- .../examples/adafruit/ST7565/Configuration.h | 24 +++++++++++++++++-- .../FLSUN/auto_calibrate/Configuration.h | 24 +++++++++++++++++-- .../delta/FLSUN/kossel_mini/Configuration.h | 24 +++++++++++++++++-- .../examples/delta/generic/Configuration.h | 24 +++++++++++++++++-- .../delta/kossel_mini/Configuration.h | 24 +++++++++++++++++-- .../examples/delta/kossel_pro/Configuration.h | 24 +++++++++++++++++-- .../examples/delta/kossel_xl/Configuration.h | 24 +++++++++++++++++-- .../examples/gCreate/gMax1.5+/Configuration.h | 24 +++++++++++++++++-- .../config/examples/makibox/Configuration.h | 24 +++++++++++++++++-- .../examples/stm32f103ret6/Configuration.h | 24 +++++++++++++++++-- .../examples/tvrrug/Round2/Configuration.h | 24 +++++++++++++++++-- .../src/config/examples/wt150/Configuration.h | 24 +++++++++++++++++-- 38 files changed, 836 insertions(+), 76 deletions(-) diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h index 608fbc139..74867fb4d 100644 --- a/Marlin/src/config/default/Configuration.h +++ b/Marlin/src/config/default/Configuration.h @@ -785,10 +785,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 200 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h index 114494acd..54bd517c0 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h @@ -805,10 +805,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 250 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h index 62464e0bc..6ba7d1189 100644 --- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h +++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h @@ -785,10 +785,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 260 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h index 314b153e4..2d90a6874 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration.h @@ -904,10 +904,30 @@ #define X_MAX_POS X_BED_SIZE #define Y_MAX_POS Y_BED_SIZE -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h index ee4a8bf53..b65f36fe7 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration.h @@ -791,10 +791,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 240 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h index d9ad57272..db352fbc3 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h @@ -776,10 +776,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 180 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h index 94f1944e0..5a29295c7 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h @@ -786,10 +786,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 210 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h index 82104c487..4e49511b2 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h @@ -776,10 +776,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 200 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Cartesio/Configuration.h b/Marlin/src/config/examples/Cartesio/Configuration.h index 53d8a8d9a..833802508 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration.h +++ b/Marlin/src/config/examples/Cartesio/Configuration.h @@ -784,10 +784,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 400 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h index b55e5adb5..0f9d37fec 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h @@ -795,10 +795,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 400 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h index e33b748ee..25d2bdb19 100644 --- a/Marlin/src/config/examples/Felix/Configuration.h +++ b/Marlin/src/config/examples/Felix/Configuration.h @@ -767,10 +767,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 235 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h index 54d055c33..d08f464a8 100644 --- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h +++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h @@ -767,10 +767,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 235 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h index d158a800c..902ee2f45 100644 --- a/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h +++ b/Marlin/src/config/examples/Folger Tech/i3-2020/Configuration.h @@ -789,10 +789,30 @@ #define Y_MAX_POS 182 #define Z_MAX_POS 175 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops curtail movement below minimum coordinate bounds //#define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops curtail movement above maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h index edabf41ab..e643b2cb5 100644 --- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h @@ -800,10 +800,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 200 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h index 33051a4a2..05bc41fce 100644 --- a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -785,10 +785,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 170 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h index bc190462d..7f44145fc 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h @@ -789,10 +789,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 185 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration.h b/Marlin/src/config/examples/Malyan/M150/Configuration.h index 1184ab32b..24f73261f 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration.h @@ -809,10 +809,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 180 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h index 1dbf0f618..dba9b5ece 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h @@ -787,10 +787,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 200 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops curtail movement below minimum coordinate bounds //#define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops curtail movement above maximum coordinate bounds //#define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h index f8d47c211..76ffa3efe 100644 --- a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h @@ -785,10 +785,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 200 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h index b31434b15..06fd21594 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration.h +++ b/Marlin/src/config/examples/RigidBot/Configuration.h @@ -783,10 +783,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 254 // RigidBot regular and Big are 254mm -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h index 25d73d4a8..8ab315295 100644 --- a/Marlin/src/config/examples/SCARA/Configuration.h +++ b/Marlin/src/config/examples/SCARA/Configuration.h @@ -797,10 +797,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 225 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h index fa82a1f69..c85dc0fb6 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h @@ -816,10 +816,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 170 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration.h b/Marlin/src/config/examples/TinyBoy2/Configuration.h index c9035cdb5..29a5bb6f9 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h @@ -841,10 +841,30 @@ #define Z_MAX_POS 158 #endif -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h index af5d864e6..78415e819 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h @@ -815,10 +815,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 200 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h index fd5435fc9..01f85c368 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h @@ -785,10 +785,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 190 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h index 2e98e6eb8..a3f739cd9 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -785,10 +785,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 190 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h index c72bb1b5b..7322a746c 100644 --- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h +++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h @@ -785,10 +785,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 200 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h index c60caf7b7..736740ab8 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -909,10 +909,30 @@ #define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Z_MAX_POS MANUAL_Z_HOME_POS -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops curtail movement below minimum coordinate bounds //#define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops curtail movement above maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h index b8ea78524..0b1bd642f 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -909,10 +909,30 @@ #define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Z_MAX_POS MANUAL_Z_HOME_POS -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h index ef7ab6d58..ab41a1a51 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration.h +++ b/Marlin/src/config/examples/delta/generic/Configuration.h @@ -896,10 +896,30 @@ #define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Z_MAX_POS MANUAL_Z_HOME_POS -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h index 4c0eb3cea..def7ae060 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -899,10 +899,30 @@ #define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Z_MAX_POS MANUAL_Z_HOME_POS -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h index 766fe8616..d9decdf9c 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h @@ -899,10 +899,30 @@ #define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Z_MAX_POS MANUAL_Z_HOME_POS -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h index 627dd05e7..264e93270 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h @@ -908,10 +908,30 @@ #define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Z_MAX_POS MANUAL_Z_HOME_POS -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops curtail movement below minimum coordinate bounds //#define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops curtail movement above maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h index e3314f761..5b98c7d7c 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h @@ -799,10 +799,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 500 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops curtail movement below minimum coordinate bounds //#define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops curtail movement above maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h index a5a88f3c1..067abc97e 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -788,10 +788,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 86 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/stm32f103ret6/Configuration.h b/Marlin/src/config/examples/stm32f103ret6/Configuration.h index b82179a4d..5ce28095a 100644 --- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h +++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h @@ -772,10 +772,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 180 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h index d676e7cd0..a3d0066a2 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h @@ -780,10 +780,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 120 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor diff --git a/Marlin/src/config/examples/wt150/Configuration.h b/Marlin/src/config/examples/wt150/Configuration.h index b3f98ac2f..ae8f174a9 100644 --- a/Marlin/src/config/examples/wt150/Configuration.h +++ b/Marlin/src/config/examples/wt150/Configuration.h @@ -790,10 +790,30 @@ #define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 143.0 -// If enabled, axes won't move below MIN_POS in response to movement commands. +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds #define MIN_SOFTWARE_ENDSTOPS -// If enabled, axes won't move above MAX_POS in response to movement commands. +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds #define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif /** * Filament Runout Sensor From 799360c5765bd317329543287cb81d4991d29037 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 14 Oct 2017 18:44:03 -0500 Subject: [PATCH 3/5] Enhance Teensy/RAMPS pins files --- Marlin/src/pins/pins_RAMPS.h | 2 +- Marlin/src/pins/pins_TEENSY35_36.h | 46 ++++++++++++++++++++---------- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/Marlin/src/pins/pins_RAMPS.h b/Marlin/src/pins/pins_RAMPS.h index 7371fe835..5b83176f4 100644 --- a/Marlin/src/pins/pins_RAMPS.h +++ b/Marlin/src/pins/pins_RAMPS.h @@ -45,7 +45,7 @@ */ #if ENABLED(IS_REARM) - #error "Oops! use 'pins_RAMPS_RE_ARM.h' when Re-Arm is used." + #error "Oops! Use 'BOARD_RAMPS_RE_ARM' to build for Re-ARM." #endif #if !ENABLED(IS_RAMPS_SMART) && !ENABLED(IS_RAMPS_DUO) && !ENABLED(IS_RAMPS4DUE) && !ENABLED(TARGET_LPC1768) diff --git a/Marlin/src/pins/pins_TEENSY35_36.h b/Marlin/src/pins/pins_TEENSY35_36.h index b61f1ef85..57abfa5ae 100644 --- a/Marlin/src/pins/pins_TEENSY35_36.h +++ b/Marlin/src/pins/pins_TEENSY35_36.h @@ -1,15 +1,33 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + /**************************************************************************************** * Teensy 3.5 (MK64FX512) and Teensy 3.6 (MK66FX1M0) Breadboard pin assignments * Requires the Teensyduino software with Teensy 3.5 or Teensy 3.6 selected in Arduino IDE! * http://www.pjrc.com/teensy/teensyduino.html -* ****************************************************************************************/ -#if MOTHERBOARD == 841 // BOARD_TEENSY35_36 -#define KNOWN_BOARD 1 -#define AT90USB 1286 // Disable MarlinSerial etc. #if !IS_32BIT_TEENSY - #error Oops! Make sure you have 'Teensy 3.5' or 'Teensy 3.6' selected from the 'Tools -> Boards' menu. + #error "Oops! Make sure you have 'Teensy 3.5' or 'Teensy 3.6' selected from the 'Tools -> Boards' menu." #endif #if IS_TEENSY35 @@ -18,12 +36,13 @@ #define BOARD_NAME "Teensy3.6" #endif -#define LARGE_FLASH true +#define AT90USB 1286 // Disable MarlinSerial etc. #define USBCON //1286 // Disable MarlinSerial etc. +#define LARGE_FLASH true /* -teemuatlut plan for Teensy3.5 and Teensy3.6: + teemuatlut plan for Teensy3.5 and Teensy3.6: USB GND |-----#####-----| VIN 5V X_STEP_PIN MOSI1 RX1 0 | ##### | Analog GND @@ -84,7 +103,6 @@ D8 HEATER_BED_PIN CS1 RX4 A12 31 | 46 * * 47 | 34 A15 PWM #define HEATER_0_PIN 30 #define HEATER_1_PIN 36 -#define HEATER_2_PIN -1 #define HEATER_BED_PIN 31 #define FAN_PIN 2 @@ -93,27 +111,27 @@ D8 HEATER_BED_PIN CS1 RX4 A12 31 | 46 * * 47 | 34 A15 PWM #define Z_STOP_PIN 28 #define TEMP_0_PIN 2 // Extruder / Analog pin numbering: 2 => A2 -#define TEMP_BED_PIN 1 // Bed / Analog pin numbering #define TEMP_1_PIN 0 -#define TEMP_2_PIN -1 +#define TEMP_BED_PIN 1 // Bed / Analog pin numbering -#define SDPOWER -1 -#define SD_DETECT_PIN -1 #define SDSS 39 // 8 #define LED_PIN 13 #define PS_ON_PIN 1 -#define KILL_PIN -1 #define ALARM_PIN -1 #define FILWIDTH_PIN 6 #define SOL1_PIN 28 +#if 0 +// Pretty sure this is obsolete! +// Please use Marlin 1.1.x pins files as reference for new pins files. #ifndef SDSUPPORT // these are defined in the SD library if building with SD support #define SCK_PIN 13 #define MISO_PIN 12 #define MOSI_PIN 11 #endif +#endif #ifdef ULTRA_LCD #define LCD_PINS_RS 40 @@ -126,5 +144,3 @@ D8 HEATER_BED_PIN CS1 RX4 A12 31 | 46 * * 47 | 34 A15 PWM #define BTN_EN2 47 #define BTN_ENC 48 #endif - -#endif // MOTHERBOARD == 841 (Teensy3.5 and Teensy3.6) From fd128b3c93e21f8c17e4f0299fa31afe1e5aad96 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 14 Oct 2017 19:05:10 -0500 Subject: [PATCH 4/5] Fix some AVR HAL code style --- Marlin/src/HAL/HAL_AVR/HAL_AVR.h | 11 +++-------- Marlin/src/HAL/HAL_AVR/HAL_pinsDebug_AVR.h | 5 +++-- Marlin/src/HAL/HAL_AVR/MarlinSerial.h | 6 +++--- Marlin/src/HAL/HAL_AVR/SanityCheck_AVR_8_bit.h | 13 +++++-------- Marlin/src/HAL/HAL_AVR/ServoTimers.h | 9 +++++++-- Marlin/src/HAL/HAL_AVR/fastio_1280.h | 6 +++--- Marlin/src/HAL/HAL_AVR/fastio_1281.h | 6 +++--- Marlin/src/HAL/HAL_AVR/fastio_168.h | 6 +++--- Marlin/src/HAL/HAL_AVR/fastio_644.h | 6 +++--- Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h | 6 +++--- Marlin/src/HAL/HAL_AVR/fastio_AVR.h | 6 +++--- Marlin/src/HAL/HAL_AVR/math_AVR.h | 6 +++--- Marlin/src/HAL/HAL_AVR/pinsDebug_AVR_8_bit.h | 4 ++++ Marlin/src/HAL/HAL_AVR/pinsDebug_Teensyduino.h | 5 +++++ Marlin/src/HAL/HAL_AVR/pinsDebug_plus_70.h | 6 +++--- Marlin/src/HAL/HAL_AVR/spi_pins.h | 6 +++--- Marlin/src/HAL/HAL_AVR/watchdog_AVR.h | 6 +++--- 17 files changed, 60 insertions(+), 53 deletions(-) diff --git a/Marlin/src/HAL/HAL_AVR/HAL_AVR.h b/Marlin/src/HAL/HAL_AVR/HAL_AVR.h index 95c0db5c6..60a73581c 100644 --- a/Marlin/src/HAL/HAL_AVR/HAL_AVR.h +++ b/Marlin/src/HAL/HAL_AVR/HAL_AVR.h @@ -26,8 +26,8 @@ */ -#ifndef _HAL_AVR_H -#define _HAL_AVR_H +#ifndef _HAL_AVR_H_ +#define _HAL_AVR_H_ // -------------------------------------------------------------------------- // Includes @@ -153,9 +153,4 @@ inline void HAL_adc_init(void) { #define HAL_READ_ADC ADC - -// -------------------------------------------------------------------------- -// -// -------------------------------------------------------------------------- - -#endif // _HAL_AVR_H +#endif // _HAL_AVR_H_ diff --git a/Marlin/src/HAL/HAL_AVR/HAL_pinsDebug_AVR.h b/Marlin/src/HAL/HAL_AVR/HAL_pinsDebug_AVR.h index 0e430beea..c20f58a9a 100644 --- a/Marlin/src/HAL/HAL_AVR/HAL_pinsDebug_AVR.h +++ b/Marlin/src/HAL/HAL_AVR/HAL_pinsDebug_AVR.h @@ -20,7 +20,8 @@ * */ -#ifndef HAL_PINSDEBUG_AVR_H +#ifndef _HAL_PINSDEBUG_AVR_H_ +#define _HAL_PINSDEBUG_AVR_H_ void HAL_print_analog_pin(char buffer[], int8_t pin) { sprintf(buffer, "(A%2d) ", int(pin - analogInputToDigitalPin(0))); @@ -590,4 +591,4 @@ inline void report_pin_state_extended(int8_t pin, bool ignore, bool extended = f } } -#endif //HAL_PINSDEBUG_AVR_H \ No newline at end of file +#endif // _HAL_PINSDEBUG_AVR_H_ diff --git a/Marlin/src/HAL/HAL_AVR/MarlinSerial.h b/Marlin/src/HAL/HAL_AVR/MarlinSerial.h index a909ad98d..e289e7cf1 100644 --- a/Marlin/src/HAL/HAL_AVR/MarlinSerial.h +++ b/Marlin/src/HAL/HAL_AVR/MarlinSerial.h @@ -29,8 +29,8 @@ * Modified 01 October 2017 by Eduardo José Tagle (added XON/XOFF) */ -#ifndef MARLINSERIAL_H -#define MARLINSERIAL_H +#ifndef _MARLINSERIAL_H_ +#define _MARLINSERIAL_H_ #include "../../inc/MarlinConfig.h" @@ -181,4 +181,4 @@ extern HardwareSerial bluetoothSerial; #endif -#endif // MARLINSERIAL_H +#endif // _MARLINSERIAL_H_ diff --git a/Marlin/src/HAL/HAL_AVR/SanityCheck_AVR_8_bit.h b/Marlin/src/HAL/HAL_AVR/SanityCheck_AVR_8_bit.h index a8bad153e..f2b8233ef 100644 --- a/Marlin/src/HAL/HAL_AVR/SanityCheck_AVR_8_bit.h +++ b/Marlin/src/HAL/HAL_AVR/SanityCheck_AVR_8_bit.h @@ -20,15 +20,13 @@ * */ +#ifndef _SANITYCHECK_AVR_8_BIT_H_ +#define _SANITYCHECK_AVR_8_BIT_H_ + /** * Test AVR specific configuration values for errors at compile-time. */ -/** - * Require gcc 4.7 or newer (first included with Arduino 1.6.8) for C++11 features. - */ - - /** * Digipot requirement */ @@ -39,12 +37,9 @@ #endif #endif - - /** * Sanity checks for Spindle / Laser */ - #if ENABLED(SPINDLE_LASER_ENABLE) #if !PIN_EXISTS(SPINDLE_LASER_ENABLE) #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENABLE_PIN." @@ -100,3 +95,5 @@ #endif #endif #endif // SPINDLE_LASER_ENABLE + +#endif // _SANITYCHECK_AVR_8_BIT_H_ diff --git a/Marlin/src/HAL/HAL_AVR/ServoTimers.h b/Marlin/src/HAL/HAL_AVR/ServoTimers.h index 231d1a6d2..7d7c27515 100644 --- a/Marlin/src/HAL/HAL_AVR/ServoTimers.h +++ b/Marlin/src/HAL/HAL_AVR/ServoTimers.h @@ -21,7 +21,7 @@ */ /* - Servo.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2 + ServoTimers.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2 Copyright (c) 2009 Michael Margolis. All right reserved. This library is free software; you can redistribute it and/or @@ -39,7 +39,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -/* +#ifndef _SERVOTIMERS_H_ +#define _SERVOTIMERS_H_ + +/** * Defines for 16 bit timers used with Servo library * * If _useTimerX is defined then TimerX is a 16 bit timer on the current board @@ -88,3 +91,5 @@ typedef enum { #endif _Nbr_16timers } timer16_Sequence_t; + +#endif // _SERVOTIMERS_H_ diff --git a/Marlin/src/HAL/HAL_AVR/fastio_1280.h b/Marlin/src/HAL/HAL_AVR/fastio_1280.h index ed96002f2..aae91a104 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_1280.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_1280.h @@ -28,8 +28,8 @@ * Marlin 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 */ -#ifndef _FASTIO_1280 -#define _FASTIO_1280 +#ifndef _FASTIO_1280_H_ +#define _FASTIO_1280_H_ #include "fastio_AVR.h" @@ -1112,4 +1112,4 @@ #define PL7_DDR DDRL #define PL7_PWM NULL -#endif // _FASTIO_1280 +#endif // _FASTIO_1280_H_ diff --git a/Marlin/src/HAL/HAL_AVR/fastio_1281.h b/Marlin/src/HAL/HAL_AVR/fastio_1281.h index 0bbea73ed..59cfce889 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_1281.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_1281.h @@ -28,8 +28,8 @@ * Marlin 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 */ -#ifndef _FASTIO_1281 -#define _FASTIO_1281 +#ifndef _FASTIO_1281_H_ +#define _FASTIO_1281_H_ #include "fastio_AVR.h" @@ -717,4 +717,4 @@ #define PG5_DDR DDRG #define PG5_PWM &OCR0B -#endif // _FASTIO_1281 +#endif // _FASTIO_1281_H_ diff --git a/Marlin/src/HAL/HAL_AVR/fastio_168.h b/Marlin/src/HAL/HAL_AVR/fastio_168.h index 89304defe..cc78ee26c 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_168.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_168.h @@ -28,8 +28,8 @@ * Marlin 08 09 10 11 12 13 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 */ -#ifndef _FASTIO_168 -#define _FASTIO_168 +#ifndef _FASTIO_168_H_ +#define _FASTIO_168_H_ #include "fastio_AVR.h" @@ -359,4 +359,4 @@ #define PD7_DDR DDRD #define PD7_PWM NULL -#endif // _FASTIO_168 +#endif // _FASTIO_168_H_ diff --git a/Marlin/src/HAL/HAL_AVR/fastio_644.h b/Marlin/src/HAL/HAL_AVR/fastio_644.h index c0a453397..031aa133b 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_644.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_644.h @@ -28,8 +28,8 @@ * Marlin 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 */ -#ifndef _FASTIO_644 -#define _FASTIO_644 +#ifndef _FASTIO_644_H_ +#define _FASTIO_644_H_ #include "fastio_AVR.h" @@ -528,4 +528,4 @@ #define PD7_DDR DDRD #define PD7_PWM OCR2A -#endif // _FASTIO_644 +#endif // _FASTIO_644_H_ diff --git a/Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h b/Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h index 803944e4d..b9747decb 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h @@ -29,8 +29,8 @@ * The pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3 */ -#ifndef _FASTIO_AT90USB -#define _FASTIO_AT90USB +#ifndef _FASTIO_AT90USB_H_ +#define _FASTIO_AT90USB_H_ #include "fastio_AVR.h" @@ -699,4 +699,4 @@ #define TIMER3B 4 #define TIMER3C 3 -#endif // _FASTIO_AT90USB +#endif // _FASTIO_AT90USB_H_ diff --git a/Marlin/src/HAL/HAL_AVR/fastio_AVR.h b/Marlin/src/HAL/HAL_AVR/fastio_AVR.h index 5e3292d82..eb4e883b6 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_AVR.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_AVR.h @@ -26,8 +26,8 @@ * Contributed by Triffid_Hunter. Modified by Kliment and the Marlin team. */ -#ifndef _FASTIO_ARDUINO_H -#define _FASTIO_ARDUINO_H +#ifndef _FASTIO_ARDUINO_H_ +#define _FASTIO_ARDUINO_H_ #include #include "../../core/macros.h" @@ -323,4 +323,4 @@ typedef enum { // finally - the macro that tells us if a pin is an available hardware PWM #define USEABLE_HARDWARE_PWM(p) (PWM_PINS(p) && !PWM_CHK(p)) -#endif // _FASTIO_ARDUINO_H +#endif // _FASTIO_ARDUINO_H_ diff --git a/Marlin/src/HAL/HAL_AVR/math_AVR.h b/Marlin/src/HAL/HAL_AVR/math_AVR.h index 9d210eed3..e0feab034 100644 --- a/Marlin/src/HAL/HAL_AVR/math_AVR.h +++ b/Marlin/src/HAL/HAL_AVR/math_AVR.h @@ -20,8 +20,8 @@ * */ -#ifndef MATH_AVR_H -#define MATH_AVR_H +#ifndef _MATH_AVR_H_ +#define _MATH_AVR_H_ /** * Optimized math functions for AVR @@ -109,4 +109,4 @@ ) -#endif +#endif // _MATH_AVR_H_ diff --git a/Marlin/src/HAL/HAL_AVR/pinsDebug_AVR_8_bit.h b/Marlin/src/HAL/HAL_AVR/pinsDebug_AVR_8_bit.h index bf8da829c..20bdcc684 100644 --- a/Marlin/src/HAL/HAL_AVR/pinsDebug_AVR_8_bit.h +++ b/Marlin/src/HAL/HAL_AVR/pinsDebug_AVR_8_bit.h @@ -24,6 +24,8 @@ * PWM print routines for Atmel 8 bit AVR CPUs */ +#ifndef _PINSDEBUG_AVR_8_BIT_ +#define _PINSDEBUG_AVR_8_BIT_ #define AVR_ATmega2560_FAMILY_PLUS_70 (MOTHERBOARD == BOARD_BQ_ZUM_MEGA_3D \ || MOTHERBOARD == BOARD_MIGHTYBOARD_REVE \ @@ -399,3 +401,5 @@ static void pwm_details(uint8_t pin) { #endif #define GET_PIN_INFO(pin) do{}while(0) + +#endif // _PINSDEBUG_AVR_8_BIT_ diff --git a/Marlin/src/HAL/HAL_AVR/pinsDebug_Teensyduino.h b/Marlin/src/HAL/HAL_AVR/pinsDebug_Teensyduino.h index 187c190f6..840e2a22e 100644 --- a/Marlin/src/HAL/HAL_AVR/pinsDebug_Teensyduino.h +++ b/Marlin/src/HAL/HAL_AVR/pinsDebug_Teensyduino.h @@ -20,6 +20,9 @@ * */ +#ifndef _PINSDEBUG_TEENSYSUINO_H_ +#define _PINSDEBUG_TEENSYSUINO_H_ + // // some of the pin mapping functions of the Teensduino extension to the Arduino IDE // do not function the same as the other Arduino extensions @@ -108,3 +111,5 @@ const uint8_t PROGMEM digital_pin_to_port_PGM[] = { // disable the PWMs so we can use it as is // portModeRegister(pin) is OK + +#endif // _PINSDEBUG_TEENSYSUINO_H_ diff --git a/Marlin/src/HAL/HAL_AVR/pinsDebug_plus_70.h b/Marlin/src/HAL/HAL_AVR/pinsDebug_plus_70.h index 1a905bd46..95006ee7e 100644 --- a/Marlin/src/HAL/HAL_AVR/pinsDebug_plus_70.h +++ b/Marlin/src/HAL/HAL_AVR/pinsDebug_plus_70.h @@ -25,8 +25,8 @@ * structurs for 2560 family boards that use morre than 70 pins */ -#ifndef __PINSDEBUG_PLUS_70_H__ -#define __PINSDEBUG_PLUS_70_H__ +#ifndef _PINSDEBUG_PLUS_70_H_ +#define _PINSDEBUG_PLUS_70_H_ #undef NUM_DIGITAL_PINS #if MOTHERBOARD == BOARD_BQ_ZUM_MEGA_3D @@ -338,4 +338,4 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM_plus_70[] = { */ -#endif // __PINSDEBUG_PLUS_70_H__ +#endif // _PINSDEBUG_PLUS_70_H_ diff --git a/Marlin/src/HAL/HAL_AVR/spi_pins.h b/Marlin/src/HAL/HAL_AVR/spi_pins.h index 9d67bad36..d4838956e 100644 --- a/Marlin/src/HAL/HAL_AVR/spi_pins.h +++ b/Marlin/src/HAL/HAL_AVR/spi_pins.h @@ -20,8 +20,8 @@ * */ -#ifndef SPI_PINS_H_ -#define SPI_PINS_H_ +#ifndef _SPI_PINS_H_ +#define _SPI_PINS_H_ /** * Define SPI Pins: SCK, MISO, MOSI, SS @@ -67,4 +67,4 @@ #endif -#endif /* SPI_PINS_H_ */ +#endif // _SPI_PINS_H_ diff --git a/Marlin/src/HAL/HAL_AVR/watchdog_AVR.h b/Marlin/src/HAL/HAL_AVR/watchdog_AVR.h index a66feebec..90c6185cb 100644 --- a/Marlin/src/HAL/HAL_AVR/watchdog_AVR.h +++ b/Marlin/src/HAL/HAL_AVR/watchdog_AVR.h @@ -20,8 +20,8 @@ * */ -#ifndef WATCHDOG_AVR_H -#define WATCHDOG_AVR_H +#ifndef _WATCHDOG_AVR_H_ +#define _WATCHDOG_AVR_H_ #include @@ -32,4 +32,4 @@ void watchdog_init(); // first watchdog_init or AVR will go into emergency procedures. inline void watchdog_reset() { wdt_reset(); } -#endif // WATCHDOG_AVR_H +#endif // _WATCHDOG_AVR_H_ From e587f0893cc160ee5465a172fb689be9872e5f57 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 14 Oct 2017 19:05:32 -0500 Subject: [PATCH 5/5] Define AVR_ATmega2560_FAMILY_PLUS_70 in Conditionals --- Marlin/src/HAL/HAL_AVR/HAL_pinsDebug_AVR.h | 7 ++----- Marlin/src/HAL/HAL_AVR/pinsDebug_AVR_8_bit.h | 5 +---- Marlin/src/inc/Conditionals_post.h | 7 +++++++ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Marlin/src/HAL/HAL_AVR/HAL_pinsDebug_AVR.h b/Marlin/src/HAL/HAL_AVR/HAL_pinsDebug_AVR.h index c20f58a9a..a278c08b9 100644 --- a/Marlin/src/HAL/HAL_AVR/HAL_pinsDebug_AVR.h +++ b/Marlin/src/HAL/HAL_AVR/HAL_pinsDebug_AVR.h @@ -23,6 +23,8 @@ #ifndef _HAL_PINSDEBUG_AVR_H_ #define _HAL_PINSDEBUG_AVR_H_ +#include "../../inc/MarlinConfig.h" + void HAL_print_analog_pin(char buffer[], int8_t pin) { sprintf(buffer, "(A%2d) ", int(pin - analogInputToDigitalPin(0))); } @@ -111,11 +113,6 @@ const PinInfo pin_array[] PROGMEM = { }; -#define AVR_ATmega2560_FAMILY_PLUS_70 (MOTHERBOARD == BOARD_BQ_ZUM_MEGA_3D \ -|| MOTHERBOARD == BOARD_MIGHTYBOARD_REVE \ -|| MOTHERBOARD == BOARD_MINIRAMBO \ -|| MOTHERBOARD == BOARD_SCOOVO_X9H) - #if AVR_AT90USB1286_FAMILY // Working with Teensyduino extension so need to re-define some things #include "pinsDebug_Teensyduino.h" diff --git a/Marlin/src/HAL/HAL_AVR/pinsDebug_AVR_8_bit.h b/Marlin/src/HAL/HAL_AVR/pinsDebug_AVR_8_bit.h index 20bdcc684..595283f9c 100644 --- a/Marlin/src/HAL/HAL_AVR/pinsDebug_AVR_8_bit.h +++ b/Marlin/src/HAL/HAL_AVR/pinsDebug_AVR_8_bit.h @@ -27,10 +27,7 @@ #ifndef _PINSDEBUG_AVR_8_BIT_ #define _PINSDEBUG_AVR_8_BIT_ -#define AVR_ATmega2560_FAMILY_PLUS_70 (MOTHERBOARD == BOARD_BQ_ZUM_MEGA_3D \ -|| MOTHERBOARD == BOARD_MIGHTYBOARD_REVE \ -|| MOTHERBOARD == BOARD_MINIRAMBO \ -|| MOTHERBOARD == BOARD_SCOOVO_X9H) +#include "../../inc/MarlinConfig.h" #if AVR_AT90USB1286_FAMILY // Working with Teensyduino extension so need to re-define some things diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 9b3bb5928..ae4ddb7a6 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -28,6 +28,13 @@ #ifndef CONDITIONALS_POST_H #define CONDITIONALS_POST_H + #define AVR_ATmega2560_FAMILY_PLUS_70 ( \ + MB(BQ_ZUM_MEGA_3D) \ + || MB(MIGHTYBOARD_REVE) \ + || MB(MINIRAMBO) \ + || MB(SCOOVO_X9H) \ + ) + #define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA)) #define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA) #define IS_CARTESIAN !IS_KINEMATIC