diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index ba7a862ea5a2ef4a7af89119584a5634ae62dc51..c8dacd335eea1e45916e05fcc0f122df4e64c5b8 100644 --- a/Marlin/Conditionals_post.h +++ b/Marlin/Conditionals_post.h @@ -34,9 +34,28 @@ #define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS)) #define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS)) #define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS)) - #define X_CENTER float((X_MIN_POS + X_MAX_POS) * 0.5) - #define Y_CENTER float((Y_MIN_POS + Y_MAX_POS) * 0.5) - #define Z_CENTER float((Z_MIN_POS + Z_MAX_POS) * 0.5) + + // Defined only if the sanity-check is bypassed + #ifndef X_BED_SIZE + #define X_BED_SIZE X_MAX_LENGTH + #endif + #ifndef Y_BED_SIZE + #define Y_BED_SIZE Y_MAX_LENGTH + #endif + + #if ENABLED(BED_CENTER_AT_0_0) + #define X_CENTER 0 + #define Y_CENTER 0 + #else + #define X_CENTER ((X_BED_SIZE) / 2) + #define Y_CENTER ((Y_BED_SIZE) / 2) + #endif + #define Z_CENTER ((Z_MIN_POS + Z_MAX_POS) / 2) + + #define X_MIN_BED (X_CENTER - (X_BED_SIZE) / 2) + #define X_MAX_BED (X_CENTER + (X_BED_SIZE) / 2) + #define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2) + #define Y_MAX_BED (Y_CENTER + (Y_BED_SIZE) / 2) /** * CoreXY, CoreXZ, and CoreYZ - and their reverse @@ -87,11 +106,11 @@ #if ENABLED(DELTA) #define X_HOME_POS 0 #else - #define X_HOME_POS ((X_MAX_LENGTH) * (X_HOME_DIR) * 0.5) + #define X_HOME_POS ((X_BED_SIZE) * (X_HOME_DIR) * 0.5) #endif #else #if ENABLED(DELTA) - #define X_HOME_POS (X_MIN_POS + (X_MAX_LENGTH) * 0.5) + #define X_HOME_POS (X_MIN_POS + (X_BED_SIZE) * 0.5) #else #define X_HOME_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS) #endif @@ -103,11 +122,11 @@ #if ENABLED(DELTA) #define Y_HOME_POS 0 #else - #define Y_HOME_POS ((Y_MAX_LENGTH) * (Y_HOME_DIR) * 0.5) + #define Y_HOME_POS ((Y_BED_SIZE) * (Y_HOME_DIR) * 0.5) #endif #else #if ENABLED(DELTA) - #define Y_HOME_POS (Y_MIN_POS + (Y_MAX_LENGTH) * 0.5) + #define Y_HOME_POS (Y_MIN_POS + (Y_BED_SIZE) * 0.5) #else #define Y_HOME_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS) #endif @@ -151,10 +170,10 @@ */ #if ENABLED(Z_SAFE_HOMING) #ifndef Z_SAFE_HOMING_X_POINT - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) + #define Z_SAFE_HOMING_X_POINT X_CENTER #endif #ifndef Z_SAFE_HOMING_Y_POINT - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) + #define Z_SAFE_HOMING_Y_POINT Y_CENTER #endif #define X_TILT_FULCRUM Z_SAFE_HOMING_X_POINT #define Y_TILT_FULCRUM Z_SAFE_HOMING_Y_POINT @@ -792,25 +811,40 @@ #define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT #endif + /** + * Bed Probing rectangular bounds + * These can be further constrained in code for Delta and SCARA + */ #if ENABLED(DELTA) - // These will be further constrained in code, but UBL_PROBE_PT values - // cannot be compile-time verified within the radius. - #define MIN_PROBE_X (-DELTA_PRINTABLE_RADIUS) - #define MAX_PROBE_X ( DELTA_PRINTABLE_RADIUS) - #define MIN_PROBE_Y (-DELTA_PRINTABLE_RADIUS) - #define MAX_PROBE_Y ( DELTA_PRINTABLE_RADIUS) + #ifndef DELTA_PROBEABLE_RADIUS + #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS + #endif + // Probing points may be verified at compile time within the radius + // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!") + // so that may be added to SanityCheck.h in the future. + #define MIN_PROBE_X (X_CENTER - (DELTA_PROBEABLE_RADIUS)) + #define MIN_PROBE_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS)) + #define MAX_PROBE_X (X_CENTER + DELTA_PROBEABLE_RADIUS) + #define MAX_PROBE_Y (Y_CENTER + DELTA_PROBEABLE_RADIUS) #elif IS_SCARA #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) - #define MIN_PROBE_X (-SCARA_PRINTABLE_RADIUS) - #define MAX_PROBE_X ( SCARA_PRINTABLE_RADIUS) - #define MIN_PROBE_Y (-SCARA_PRINTABLE_RADIUS) - #define MAX_PROBE_Y ( SCARA_PRINTABLE_RADIUS) + #define MIN_PROBE_X (X_CENTER - (SCARA_PRINTABLE_RADIUS)) + #define MIN_PROBE_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS)) + #define MAX_PROBE_X (X_CENTER + SCARA_PRINTABLE_RADIUS) + #define MAX_PROBE_Y (Y_CENTER + SCARA_PRINTABLE_RADIUS) #else - // Boundaries for probing based on set limits - #define MIN_PROBE_X (max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER)) - #define MAX_PROBE_X (min(X_MAX_POS, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER)) - #define MIN_PROBE_Y (max(Y_MIN_POS, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER)) - #define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER)) + // Boundaries for Cartesian probing based on set limits + #if ENABLED(BED_CENTER_AT_0_0) + #define MIN_PROBE_X (max(X_PROBE_OFFSET_FROM_EXTRUDER, 0) - (X_BED_SIZE) / 2) + #define MIN_PROBE_Y (max(Y_PROBE_OFFSET_FROM_EXTRUDER, 0) - (Y_BED_SIZE) / 2) + #define MAX_PROBE_X (min(X_BED_SIZE + X_PROBE_OFFSET_FROM_EXTRUDER, X_BED_SIZE) - (X_BED_SIZE) / 2) + #define MAX_PROBE_Y (min(Y_BED_SIZE + Y_PROBE_OFFSET_FROM_EXTRUDER, Y_BED_SIZE) - (Y_BED_SIZE) / 2) + #else + #define MIN_PROBE_X (max(X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER, 0)) + #define MIN_PROBE_Y (max(Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER, 0)) + #define MAX_PROBE_X (min(X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER, X_BED_SIZE)) + #define MAX_PROBE_Y (min(Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER, Y_BED_SIZE)) + #endif #endif // Stepper pulse duration, in cycles @@ -835,7 +869,7 @@ #endif /** - * DELTA_SEGMENT_MIN_LENGTH and DELTA_PROBEABLE_RADIUS for UBL_DELTA + * DELTA_SEGMENT_MIN_LENGTH for UBL_DELTA */ #if UBL_DELTA #ifndef DELTA_SEGMENT_MIN_LENGTH @@ -847,9 +881,6 @@ #define DELTA_SEGMENT_MIN_LENGTH 1.00 // mm (similar to G2/G3 arc segmentation) #endif #endif - #ifndef DELTA_PROBEABLE_RADIUS - #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS - #endif #endif // Shorthand diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index b62f5827fc287aaa5443dd2c44dae3085b7612f5..35a6aaabbf94dba31118a3058aece07626ef1543 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -755,12 +755,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 200 +#define Y_BED_SIZE 200 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 200 -#define Y_MAX_POS 200 +#define X_MAX_POS X_BED_SIZE +#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. @@ -968,8 +972,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 95a690d1fa1c26d680214df7a33dded790aca658..18276639c6eb0c75c76ffb806ec143984a0bf540 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -755,7 +755,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 5af9537d11544a9d9d44cc4aac405e35b90b9381..21daeae79c9799e934cdfbfe7279ca64ea133d6d 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -456,8 +456,8 @@ float filament_size[EXTRUDERS], volumetric_multiplier[EXTRUDERS]; #if HAS_SOFTWARE_ENDSTOPS bool soft_endstops_enabled = true; #endif -float soft_endstop_min[XYZ] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS }, - soft_endstop_max[XYZ] = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS }; +float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS }, + soft_endstop_max[XYZ] = { X_MAX_BED, Y_MAX_BED, Z_MAX_POS }; #if FAN_COUNT > 0 int16_t fanSpeeds[FAN_COUNT] = { 0 }; @@ -6905,15 +6905,16 @@ inline void gcode_M42() { for (uint8_t n = 0; n < n_samples; n++) { if (n_legs) { - int dir = (random(0, 10) > 5.0) ? -1 : 1; // clockwise or counter clockwise - float angle = random(0.0, 360.0), - radius = random( - #if ENABLED(DELTA) - DELTA_PROBEABLE_RADIUS / 8, DELTA_PROBEABLE_RADIUS / 3 - #else - 5, X_MAX_LENGTH / 8 - #endif - ); + const int dir = (random(0, 10) > 5.0) ? -1 : 1; // clockwise or counter clockwise + float angle = random(0.0, 360.0); + const float radius = random( + #if ENABLED(DELTA) + 0.1250000000 * (DELTA_PROBEABLE_RADIUS), + 0.3333333333 * (DELTA_PROBEABLE_RADIUS) + #else + 5.0, 0.125 * min(X_BED_SIZE, Y_BED_SIZE) + #endif + ); if (verbose_level > 3) { SERIAL_ECHOPAIR("Starting radius: ", radius); diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index dcd6ba1d5e8d3e2618b56c20bbe665d2480ea921..448be0f04c69ddf1b571ff0ce0c5c31af9428c2c 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -50,7 +50,9 @@ /** * Warnings for old configurations */ -#if WATCH_TEMP_PERIOD > 500 +#if !defined(X_BED_SIZE) || !defined(Y_BED_SIZE) + #error "X_BED_SIZE and BED_Y_SIZE are now required! Please update your configuration." +#elif WATCH_TEMP_PERIOD > 500 #error "WATCH_TEMP_PERIOD now uses seconds instead of milliseconds." #elif DISABLED(THERMAL_PROTECTION_HOTENDS) && (defined(WATCH_TEMP_PERIOD) || defined(THERMAL_PROTECTION_PERIOD)) #error "Thermal Runaway Protection for hotends is now enabled with THERMAL_PROTECTION_HOTENDS." diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h index e32b57c58840f56a0aa5d9841a334a69a4adc86d..3ed5c547448cf4be0caf6e59c8de8dd26ae0813f 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h @@ -770,12 +770,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 298 +#define Y_BED_SIZE 275 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 298 -#define Y_MAX_POS 275 +#define X_MAX_POS X_BED_SIZE +#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. @@ -983,8 +987,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h index 98f833393e19c28df314d8105c1c80b7828c9ea7..0fbb97caad3843b4321199fbf66f8e00bc823ae9 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h @@ -748,7 +748,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h index 769de81ee17c270af831eb3a579efbfc5d594087..a1e1630d3f141250099b992c67b9b390aae81463 100644 --- a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h +++ b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h @@ -752,12 +752,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 220 +#define Y_BED_SIZE 220 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 220 -#define Y_MAX_POS 220 +#define X_MAX_POS X_BED_SIZE +#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. @@ -965,8 +969,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/Anet/A6/Configuration.h b/Marlin/example_configurations/Anet/A6/Configuration.h index 550fd99535cfbf5f9c82957f64bb747aab97fbbd..766bde1a79cd89690a8fc014bc9998b10c2d9086 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration.h +++ b/Marlin/example_configurations/Anet/A6/Configuration.h @@ -839,47 +839,52 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +//#define X_BED_SIZE 200 +//#define Y_BED_SIZE 200 + +// Travel limits (mm) after homing, corresponding to endstop positions. //#define X_MIN_POS 0 //#define Y_MIN_POS 0 +//#define X_MAX_POS X_BED_SIZE +//#define Y_MAX_POS Y_BED_SIZE //#define Z_MIN_POS 0 -//#define X_MAX_POS 200 -//#define Y_MAX_POS 200 //#define Z_MAX_POS 200 // ANET A6 Firmware V2.0 defaults: -//#define X_MIN_POS 0 -//#define Y_MIN_POS 0 -//#define Z_MIN_POS 0 -//#define X_MAX_POS 220 -//#define Y_MAX_POS 220 -//#define Z_MAX_POS 250 +//#define X_BED_SIZE 220 +//#define Y_BED_SIZE 220 +//#define X_MIN_POS 0 +//#define Y_MIN_POS 0 +//#define Z_MIN_POS 0 +//#define Z_MAX_POS 250 // ANET A6, X0/Y0 0 front left bed edge : -#define X_MIN_POS -3 -#define Y_MIN_POS -5 -#define Z_MIN_POS 0 -#define X_MAX_POS 222 -#define Y_MAX_POS 222 -#define Z_MAX_POS 230 +#define X_BED_SIZE 222 +#define Y_BED_SIZE 222 +#define X_MIN_POS -3 +#define Y_MIN_POS -5 +#define Z_MIN_POS 0 +#define Z_MAX_POS 230 // ANET A6 with new X-Axis / modded Y-Axis: -//#define X_MIN_POS 0 -//#define Y_MIN_POS 0 -//#define Z_MIN_POS 0 -//#define X_MAX_POS 235 -//#define Y_MAX_POS 230 -//#define Z_MAX_POS 230 +//#define X_BED_SIZE 235 +//#define Y_BED_SIZE 230 +//#define X_MIN_POS 0 +//#define Y_MIN_POS 0 +//#define Z_MIN_POS 0 +//#define Z_MAX_POS 230 // ANET A6 with new X-Axis / modded Y-Axis, X0/Y0 0 front left bed edge : -//#define X_MIN_POS -8 -//#define Y_MIN_POS -6 -//#define Z_MIN_POS 0 -//#define X_MAX_POS 227 -//#define Y_MAX_POS 224 -//#define Z_MAX_POS 230 - +//#define X_BED_SIZE 227 +//#define Y_BED_SIZE 224 +//#define X_MIN_POS -8 +//#define Y_MIN_POS -6 +//#define Z_MIN_POS 0 +//#define Z_MAX_POS 230 +#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. #define MIN_SOFTWARE_ENDSTOPS @@ -1115,8 +1120,8 @@ #define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). //Anet A6 with new X-Axis //#define Z_SAFE_HOMING_X_POINT 113 // X point for Z homing when homing all axis (G28). diff --git a/Marlin/example_configurations/Anet/A6/Configuration_adv.h b/Marlin/example_configurations/Anet/A6/Configuration_adv.h index e233b6ba1ed74a33083ea612c18edbef36425595..5e0ce3bc63fdcea5345b911818bbaa5f81380d76 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A6/Configuration_adv.h @@ -755,7 +755,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/Anet/A8/Configuration.h b/Marlin/example_configurations/Anet/A8/Configuration.h index d5aadbf2ab7d96659eef19c550e8ae11f30cea3c..d02cdb921350e66c3a21c4e7195399c0cbcff6ab 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration.h +++ b/Marlin/example_configurations/Anet/A8/Configuration.h @@ -761,12 +761,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 220 +#define Y_BED_SIZE 220 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS -33 #define Y_MIN_POS -10 #define Z_MIN_POS 0 -#define X_MAX_POS 220 -#define Y_MAX_POS 220 +#define X_MAX_POS X_BED_SIZE +#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. @@ -974,8 +978,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/Anet/A8/Configuration_adv.h b/Marlin/example_configurations/Anet/A8/Configuration_adv.h index eac7964ae6284e5ddd2dce8f98f31227c2a35d3e..84ae700441c2de37e6c79c1a7715a68b17182cf5 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A8/Configuration_adv.h @@ -755,7 +755,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration.h b/Marlin/example_configurations/BQ/Hephestos/Configuration.h index e55858200f2f2b65502b6dc8bc86bb42d1e6ce15..4d2da2cbb3e87f676382e4c4351ad3b5406a6c71 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration.h @@ -741,12 +741,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 215 +#define Y_BED_SIZE 210 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 215 -#define Y_MAX_POS 210 +#define X_MAX_POS X_BED_SIZE +#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. @@ -954,8 +958,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h index a9d32e272081b143afe3b119c490896759d71529..59970954915956f4296336ca432fe7ef57522588 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h @@ -748,7 +748,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h index 39af4832d0c9abb18aa734b71bb341db1e9b4b5e..f4bff19f73a8db123d6b2e49289c2a69bb3939b3 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h @@ -752,12 +752,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 210 +#define Y_BED_SIZE 297 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 210 -#define Y_MAX_POS 297 +#define X_MAX_POS X_BED_SIZE +#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. @@ -965,8 +969,8 @@ #define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h index 63a7386038b1fddcb601faff7a77f76b2eccdd69..9a01afa9be15872c904d132be4d4753908cb1c9c 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h @@ -731,7 +731,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. #define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration.h b/Marlin/example_configurations/BQ/WITBOX/Configuration.h index 6984a9be164ce11eaf6d2d6e58b72ff7f26ffdc3..870f6057d707850e121ed77ad56c1fe1659ff84b 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration.h @@ -741,12 +741,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 297 +#define Y_BED_SIZE 210 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 297 -#define Y_MAX_POS 210 +#define X_MAX_POS X_BED_SIZE +#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. @@ -954,8 +958,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h index a9d32e272081b143afe3b119c490896759d71529..59970954915956f4296336ca432fe7ef57522588 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h @@ -748,7 +748,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index 91c8d6bf78937a44448779bbe82edebd6bacef78..7e8672468b63f9dec4bc87892dfc2652349976d3 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -749,12 +749,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 435 +#define Y_BED_SIZE 270 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 435 -#define Y_MAX_POS 270 +#define X_MAX_POS X_BED_SIZE +#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. @@ -962,8 +966,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index 0da151cb33b7023cca2dd2df058d63910ef6e808..ddcbf5dca18f69e8de3c9da9112249f30c4ed7b6 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -748,7 +748,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration.h b/Marlin/example_configurations/Creality/CR-10/Configuration.h index 535eec32684384b2c6e4b2dac46c14ea6bf351be..4fec9604478a97b1ead141d26d99ef3e71491cbf 100644 --- a/Marlin/example_configurations/Creality/CR-10/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration.h @@ -765,12 +765,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 300 +#define Y_BED_SIZE 300 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 300 -#define Y_MAX_POS 300 +#define X_MAX_POS X_BED_SIZE +#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. @@ -977,8 +981,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index fd80205a7b5cbe45eae4a63996f66a19fb38773f..d9aee3ff63dc60baf6e45790ed802d211339ef49 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -733,12 +733,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 255 +#define Y_BED_SIZE 205 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 255 -#define Y_MAX_POS 205 +#define X_MAX_POS X_BED_SIZE +#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. @@ -946,8 +950,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index c72719ec00e2053655388011e1848070e6a10a57..c86bbb5d9ab50f7e7f4901eb614447494accb0e8 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -748,7 +748,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index f1e5be4c357e8a1a9db525bf0c935ab96fccbcd6..8ac1bdcb843a84add9cb2028d79466864c98b1c8 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -733,12 +733,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 255 +#define Y_BED_SIZE 205 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 255 -#define Y_MAX_POS 205 +#define X_MAX_POS X_BED_SIZE +#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. @@ -946,8 +950,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/Folger Tech/i3-2020/Configuration.h b/Marlin/example_configurations/Folger Tech/i3-2020/Configuration.h index 151f76271ed714985721f4fb6d7b1c2b2ce3f9d8..b24c0c713648f2754ec4e97a749cc0e5f35af353 100644 --- a/Marlin/example_configurations/Folger Tech/i3-2020/Configuration.h +++ b/Marlin/example_configurations/Folger Tech/i3-2020/Configuration.h @@ -754,13 +754,18 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 207 +#define Y_BED_SIZE 182 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 6 #define Y_MIN_POS 3 #define Z_MIN_POS 0 -#define X_MAX_POS 207 -#define Y_MAX_POS 182 +#define X_MAX_POS X_BED_SIZE +#define Y_MAX_POS Y_BED_SIZE #define Z_MAX_POS 175 + // If enabled, axes won't move below MIN_POS in response to movement commands. //#define MIN_SOFTWARE_ENDSTOPS // If enabled, axes won't move above MAX_POS in response to movement commands. @@ -968,8 +973,8 @@ #define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/Folger Tech/i3-2020/Configuration_adv.h b/Marlin/example_configurations/Folger Tech/i3-2020/Configuration_adv.h index f7408a373fcde227387c2601e4febe7992b54229..bb45cf54da303a7f6c5826a739a406da2df805da 100644 --- a/Marlin/example_configurations/Folger Tech/i3-2020/Configuration_adv.h +++ b/Marlin/example_configurations/Folger Tech/i3-2020/Configuration_adv.h @@ -755,7 +755,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h index f29594e423edafb498ff63db1519ef4b3f5070de..1a303b7bd55c66f8bd478815875198a60ebf7f8a 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h @@ -759,12 +759,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 205 +#define Y_BED_SIZE 205 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 205 -#define Y_MAX_POS 205 +#define X_MAX_POS X_BED_SIZE +#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. @@ -972,8 +976,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h index 92a1eb1b5627dcbcc81ca5f18f71054e9d9fbd50..289d2a22695e13cdf8e18251faee797a645d65d0 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h @@ -745,7 +745,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/Malyan/M150/Configuration.h b/Marlin/example_configurations/Malyan/M150/Configuration.h index ac3dcbaf92370784e6d45d7e7222db3155d25fbd..a9857fd9e3a2312774525dcb6612076970a8ccbb 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration.h @@ -774,12 +774,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 200 +#define Y_BED_SIZE 200 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 200 -#define Y_MAX_POS 200 +#define X_MAX_POS X_BED_SIZE +#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. @@ -991,8 +995,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h index 53481c2086907337fc066b9ac821d87839d650c7..744a52b5bc5599cb5fd5d8e72deb9c5443fc959f 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h @@ -755,7 +755,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index f5f6eba199df7dc85ca71955d32e291877aca5d9..761e9340fdfaabd4e894f590a45d0ccba3138333 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -751,12 +751,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 200 +#define Y_BED_SIZE 200 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 200 -#define Y_MAX_POS 200 +#define X_MAX_POS X_BED_SIZE +#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. @@ -964,8 +968,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 6c3cb72d120b36eb70c76aa9565c147110d57ee5..5abc8e5e2bf8d442f614eb762d09e5fcfd491c5b 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -749,12 +749,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 254 // RigidBot regular is 254mm, RigitBot Big is 406mm +#define Y_BED_SIZE 248 // RigidBot regular is 248mm, RigitBot Big is 304mm + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 254 // RigidBot regular is 254mm, RigitBot Big is 406mm -#define Y_MAX_POS 248 // RigidBot regular is 248mm, RigitBot Big is 304mm +#define X_MAX_POS X_BED_SIZE +#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. @@ -962,8 +966,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index f2abeda022c02531449e1531f466e85301549fec..11d85927349360082cb3fe752aa123e1aa46ddbe 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -748,7 +748,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 71ab77c0100ca6368f2a12cb2866d78bc5abb12c..6d53d87374ae7ba44bcebd7d14caf9de26abec06 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -763,12 +763,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 200 +#define Y_BED_SIZE 200 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS MANUAL_Z_HOME_POS -#define X_MAX_POS 200 -#define Y_MAX_POS 200 +#define X_MAX_POS X_BED_SIZE +#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. @@ -976,8 +980,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 47a5d070b88d4525ef525da074630ac0977c6f6f..ec2f785309012ca564b14ab61cbb06faca83442c 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -748,7 +748,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/TinyBoy2/Configuration.h b/Marlin/example_configurations/TinyBoy2/Configuration.h index f41e8a87b60e729942133f9da249ce1b500d9e84..bc80b61a5cc3ac2e4a75c4c7c801d077a7fbe3e3 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration.h @@ -802,13 +802,17 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +// Tinyboy2: 100mm are marketed, actual length between endstop and end of rail is 98mm +#define X_BED_SIZE 98 +#define Y_BED_SIZE 98 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -// Tinyboy2: 100mm are marketed, actual length between endstop and end of rail is 98mm -#define X_MAX_POS 98 -#define Y_MAX_POS 98 +#define X_MAX_POS X_BED_SIZE +#define Y_MAX_POS Y_BED_SIZE #if ENABLED(TB2_L10) #define Z_MAX_POS 98 #else @@ -1020,8 +1024,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h index 3b637bd91b6b6be5164d82ab255ee612fa374413..ed8194cfebf1ca3275c959e1cde7d0198416fcf1 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h @@ -751,7 +751,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration.h b/Marlin/example_configurations/Velleman/K8200/Configuration.h index 0683fcbed485551c9c23eebc85f02b6ff072e4a4..e314373e83534fa1e41c19e6f39bace811c94b81 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration.h @@ -780,12 +780,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 200 +#define Y_BED_SIZE 200 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 200 -#define Y_MAX_POS 200 +#define X_MAX_POS X_BED_SIZE +#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. @@ -993,8 +997,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h index 5baa75858477190033967c86fb1be9d89a7c075d..3b3a74d53344310c3847b7827742479823221bd7 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h @@ -761,7 +761,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Configuration.h index fa595b9a74f317569a33a746e6fa1dac9f18ee53..f93895aa93a95d226b1d026a4b96c96a9cb90bfa 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration.h @@ -751,12 +751,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 200 +#define Y_BED_SIZE 200 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 20 #define Z_MIN_POS 0 -#define X_MAX_POS 200 -#define Y_MAX_POS 200 +#define X_MAX_POS X_BED_SIZE +#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. @@ -964,8 +968,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h index 88c88cffedac0653ae5599ab3a3e08e2dcf9e7b7..ae067b5676c19331e47a2569c1e15b7a8d54fdbf 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h @@ -748,7 +748,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h index b7ecf8ad3da09da408e1cc0cec20280a0e1884ba..bcbe505812e54a0b1ad03beed5fac9b946368b53 100644 --- a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h @@ -751,12 +751,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 200 +#define Y_BED_SIZE 200 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 20 #define Z_MIN_POS 0 -#define X_MAX_POS 200 -#define Y_MAX_POS 200 +#define X_MAX_POS X_BED_SIZE +#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. @@ -964,8 +968,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index cef34701fcc96edd6fc7fa5672ac77831cdfb94f..835cc3199ac3e06dca1904b040de01a1572e8d2c 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -751,12 +751,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 200 +#define Y_BED_SIZE 200 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 200 -#define Y_MAX_POS 200 +#define X_MAX_POS X_BED_SIZE +#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. @@ -964,8 +968,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h index c76ed5bf41d807859526dcbba998338495f46052..40a857ef089606f4ac4b1ab3350c50d45a915295 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h @@ -875,7 +875,11 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2) +#define Y_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2) + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS -(DELTA_PRINTABLE_RADIUS) #define Y_MIN_POS -(DELTA_PRINTABLE_RADIUS) #define Z_MIN_POS 0 diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h index e02fd97a627ebe907f0a01ef913caab3d0c4a233..e6b3283836d96ccb3f62a0a2b3d7441a58b65a38 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -753,7 +753,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h index dd685ced0fb2f5d20eb22f256bc76a6451edc850..87b410c25f18e56920190e60ba8fe089b9b715cd 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h @@ -875,7 +875,11 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2) +#define Y_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2) + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS -(DELTA_PRINTABLE_RADIUS) #define Y_MIN_POS -(DELTA_PRINTABLE_RADIUS) #define Z_MIN_POS 0 diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h index 3f763b8bbf8d8b37006b08be60057b2f0f178183..b25b49b1ab0c78830878e9c1832061b22f35f6d2 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -752,7 +752,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 7919ff832b5200e5dac1a222e526946b0c33d5c2..8633e20ac9d2b54aec37e46621f3d634ba74c379 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -862,7 +862,11 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2) +#define Y_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2) + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS -(DELTA_PRINTABLE_RADIUS) #define Y_MIN_POS -(DELTA_PRINTABLE_RADIUS) #define Z_MIN_POS 0 diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 0355391490bfe4cbd2ad311028fdc20d0afb50d3..739d2d6407219ba409ad1668e16a93ab8dccd0c9 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -750,7 +750,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 0e65048205e64ec2e721b51b176e06ef2dadd93f..2205fc014ce593a7b682a7ec728ee8fb9b2bf83c 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -860,7 +860,11 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2) +#define Y_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2) + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS -(DELTA_PRINTABLE_RADIUS) #define Y_MIN_POS -(DELTA_PRINTABLE_RADIUS) #define Z_MIN_POS 0 diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 0355391490bfe4cbd2ad311028fdc20d0afb50d3..739d2d6407219ba409ad1668e16a93ab8dccd0c9 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -750,7 +750,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 5ed569fd2f2077086a38a37f9c2d41aab0ca08ea..ad9d87e02b3e70cfb81ff6719ea09629e54b0446 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -865,7 +865,11 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2) +#define Y_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2) + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS -(DELTA_PRINTABLE_RADIUS) #define Y_MIN_POS -(DELTA_PRINTABLE_RADIUS) #define Z_MIN_POS 0 diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 4b676e4256042392f332015a760db9fe647f28d1..e08ff0b48a379439c225b8957b0a43b1d6bfef68 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -755,7 +755,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index bca02a2d84f72b92eaab19dad03eeb1f6bda99bc..aad12e7a1763ed5996fc5f040ccaac885fe33137 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -928,7 +928,11 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2) +#define Y_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2) + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS -(DELTA_PRINTABLE_RADIUS) #define Y_MIN_POS -(DELTA_PRINTABLE_RADIUS) #define Z_MIN_POS 0 diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index a3994d5ecf65fa590d10a476a25b08e4f667c232..3b9b4ddcd5754f332e954b50351d863328186be5 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -750,7 +750,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h index ec55d2aaaedcfc7df35a7cdfb2b3b9c837e176b3..bd9c125e3435981899384b811976fd81fc03c7af 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h @@ -766,13 +766,17 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 420 // These numbers are not accurate for an unaltered gMax 1.5+ printer. My print bed +#define Y_BED_SIZE 420 // is inset a noticable amount from the edge of the bed. Combined with the inset, + // the nozzle can reach all cordinates of the mesh. + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 420 // These numbers are not accurate for an unaltered gMax 1.5+ printer. My print bed -#define Y_MAX_POS 420 // is inset a noticable amount from the edge of the bed. Combined with the inset, - // the nozzle can reach all cordinates of the mesh. +#define X_MAX_POS X_BED_SIZE +#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. diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h index d1c31153bfa9b8a74a12dadd9f4dcf0690e6d28d..7f003a4b890118a3982052f57937907c371da6be 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h @@ -755,7 +755,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 37b080d3bc34e9dc0df727ed9e10aca34de351b6..ffb5d9e0c0e1fa0bd8733a41553a82241853965b 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -754,12 +754,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 110 +#define Y_BED_SIZE 150 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 110 -#define Y_MAX_POS 150 +#define X_MAX_POS X_BED_SIZE +#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. @@ -967,8 +971,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 52649f494b0322e37d519390a173599dbf532eb2..1f616b5b09b525c60aff26b1150ed795e93a2db5 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -748,7 +748,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 54c274207c3ae057b5edee1f1d1956a7f7a44598..112afb8cd9ec91a73ee37f0cb3be90343bcce013 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -746,12 +746,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 205 +#define Y_BED_SIZE 205 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 205 -#define Y_MAX_POS 205 +#define X_MAX_POS X_BED_SIZE +#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. @@ -959,8 +963,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 431e143830a6a0f67b956f421eebb7a2c7096354..b1cafd031b0bd73e699718192fac39e0ee9b9c93 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -748,7 +748,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/example_configurations/wt150/Configuration.h b/Marlin/example_configurations/wt150/Configuration.h index 8cdde10c2d8b30343426c68b24009e82c17bc16c..fbfe75a4777827cf1c5c1e31dfb1661e70c2c598 100644 --- a/Marlin/example_configurations/wt150/Configuration.h +++ b/Marlin/example_configurations/wt150/Configuration.h @@ -757,12 +757,16 @@ // @section machine -// Travel limits after homing (units are in mm) +// The size of the print bed +#define X_BED_SIZE 150 +#define Y_BED_SIZE 150 + +// Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 #define Y_MIN_POS 0 #define Z_MIN_POS 0 -#define X_MAX_POS 150 -#define Y_MAX_POS 150 +#define X_MAX_POS X_BED_SIZE +#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. @@ -970,8 +974,8 @@ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) - #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28). - #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axis (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axis (G28). #endif // Homing speeds (mm/m) diff --git a/Marlin/example_configurations/wt150/Configuration_adv.h b/Marlin/example_configurations/wt150/Configuration_adv.h index efac0c4b235ecaad4e25a23569ea501945a4199c..afbeb57019ca537f22eb0ec71dbdb8ce086d1242 100644 --- a/Marlin/example_configurations/wt150/Configuration_adv.h +++ b/Marlin/example_configurations/wt150/Configuration_adv.h @@ -755,7 +755,7 @@ // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. //#define ADVANCED_OK -// @section fwretract +// @section extras /** * Firmware-based and LCD-controlled retract diff --git a/Marlin/ubl_G29.cpp b/Marlin/ubl_G29.cpp index 24ea394455359bab44686476a471e82bd425bf37..bc645fb2c471ea5224b0b83065b01fadff308356 100644 --- a/Marlin/ubl_G29.cpp +++ b/Marlin/ubl_G29.cpp @@ -467,8 +467,8 @@ g29_x_pos = X_HOME_POS; g29_y_pos = Y_HOME_POS; #else // cartesian - g29_x_pos = X_PROBE_OFFSET_FROM_EXTRUDER > 0 ? X_MAX_POS : X_MIN_POS; - g29_y_pos = Y_PROBE_OFFSET_FROM_EXTRUDER < 0 ? Y_MAX_POS : Y_MIN_POS; + g29_x_pos = X_PROBE_OFFSET_FROM_EXTRUDER > 0 ? X_BED_SIZE : 0; + g29_y_pos = Y_PROBE_OFFSET_FROM_EXTRUDER < 0 ? Y_BED_SIZE : 0; #endif } @@ -1132,12 +1132,12 @@ SERIAL_PROTOCOLLNPGM("Both X & Y locations must be specified.\n"); err_flag = true; } - if (!WITHIN(RAW_X_POSITION(g29_x_pos), X_MIN_POS, X_MAX_POS)) { + if (!WITHIN(RAW_X_POSITION(g29_x_pos), X_MIN_BED, X_MAX_BED)) { SERIAL_PROTOCOLLNPGM("Invalid X location specified.\n"); err_flag = true; } - if (!WITHIN(RAW_Y_POSITION(g29_y_pos), Y_MIN_POS, Y_MAX_POS)) { + if (!WITHIN(RAW_Y_POSITION(g29_y_pos), Y_MIN_BED, Y_MAX_BED)) { SERIAL_PROTOCOLLNPGM("Invalid Y location specified.\n"); err_flag = true; }