Browse Source

Add bed size as a configuration option

Scott Lahteine 7 years ago
parent
commit
51864fd365
37 changed files with 378 additions and 210 deletions
  1. 59
    28
      Marlin/Conditionals_post.h
  2. 9
    5
      Marlin/Configuration.h
  3. 12
    11
      Marlin/Marlin_main.cpp
  4. 3
    1
      Marlin/SanityCheck.h
  5. 9
    5
      Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h
  6. 9
    5
      Marlin/example_configurations/AliExpress/CL-260/Configuration.h
  7. 35
    30
      Marlin/example_configurations/Anet/A6/Configuration.h
  8. 9
    5
      Marlin/example_configurations/Anet/A8/Configuration.h
  9. 9
    5
      Marlin/example_configurations/BQ/Hephestos/Configuration.h
  10. 9
    5
      Marlin/example_configurations/BQ/Hephestos_2/Configuration.h
  11. 9
    5
      Marlin/example_configurations/BQ/WITBOX/Configuration.h
  12. 9
    5
      Marlin/example_configurations/Cartesio/Configuration.h
  13. 9
    5
      Marlin/example_configurations/Creality/CR-10/Configuration.h
  14. 9
    5
      Marlin/example_configurations/Felix/Configuration.h
  15. 9
    5
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  16. 10
    5
      Marlin/example_configurations/Folger Tech/i3-2020/Configuration.h
  17. 9
    5
      Marlin/example_configurations/Infitary/i3-M508/Configuration.h
  18. 9
    5
      Marlin/example_configurations/Malyan/M150/Configuration.h
  19. 9
    5
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  20. 9
    5
      Marlin/example_configurations/RigidBot/Configuration.h
  21. 9
    5
      Marlin/example_configurations/SCARA/Configuration.h
  22. 10
    6
      Marlin/example_configurations/TinyBoy2/Configuration.h
  23. 9
    5
      Marlin/example_configurations/Velleman/K8200/Configuration.h
  24. 9
    5
      Marlin/example_configurations/Velleman/K8400/Configuration.h
  25. 9
    5
      Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h
  26. 9
    5
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  27. 5
    1
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h
  28. 5
    1
      Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h
  29. 5
    1
      Marlin/example_configurations/delta/generic/Configuration.h
  30. 5
    1
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  31. 5
    1
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  32. 5
    1
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  33. 8
    4
      Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h
  34. 9
    5
      Marlin/example_configurations/makibox/Configuration.h
  35. 9
    5
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  36. 9
    5
      Marlin/example_configurations/wt150/Configuration.h
  37. 4
    4
      Marlin/ubl_G29.cpp

+ 59
- 28
Marlin/Conditionals_post.h View File

@@ -34,9 +34,28 @@
34 34
   #define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS))
35 35
   #define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS))
36 36
   #define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS))
37
-  #define X_CENTER float((X_MIN_POS + X_MAX_POS) * 0.5)
38
-  #define Y_CENTER float((Y_MIN_POS + Y_MAX_POS) * 0.5)
39
-  #define Z_CENTER float((Z_MIN_POS + Z_MAX_POS) * 0.5)
37
+
38
+  // Defined only if the sanity-check is bypassed
39
+  #ifndef X_BED_SIZE
40
+    #define X_BED_SIZE X_MAX_LENGTH
41
+  #endif
42
+  #ifndef Y_BED_SIZE
43
+    #define Y_BED_SIZE Y_MAX_LENGTH
44
+  #endif
45
+
46
+  #if ENABLED(BED_CENTER_AT_0_0)
47
+    #define X_CENTER 0
48
+    #define Y_CENTER 0
49
+  #else
50
+    #define X_CENTER ((X_BED_SIZE) / 2)
51
+    #define Y_CENTER ((Y_BED_SIZE) / 2)
52
+  #endif
53
+  #define Z_CENTER ((Z_MIN_POS + Z_MAX_POS) / 2)
54
+
55
+  #define X_MIN_BED (X_CENTER - (X_BED_SIZE) / 2)
56
+  #define X_MAX_BED (X_CENTER + (X_BED_SIZE) / 2)
57
+  #define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2)
58
+  #define Y_MAX_BED (Y_CENTER + (Y_BED_SIZE) / 2)
40 59
 
41 60
   /**
42 61
    * CoreXY, CoreXZ, and CoreYZ - and their reverse
@@ -87,11 +106,11 @@
87 106
     #if ENABLED(DELTA)
88 107
       #define X_HOME_POS 0
89 108
     #else
90
-      #define X_HOME_POS ((X_MAX_LENGTH) * (X_HOME_DIR) * 0.5)
109
+      #define X_HOME_POS ((X_BED_SIZE) * (X_HOME_DIR) * 0.5)
91 110
     #endif
92 111
   #else
93 112
     #if ENABLED(DELTA)
94
-      #define X_HOME_POS (X_MIN_POS + (X_MAX_LENGTH) * 0.5)
113
+      #define X_HOME_POS (X_MIN_POS + (X_BED_SIZE) * 0.5)
95 114
     #else
96 115
       #define X_HOME_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS)
97 116
     #endif
@@ -103,11 +122,11 @@
103 122
     #if ENABLED(DELTA)
104 123
       #define Y_HOME_POS 0
105 124
     #else
106
-      #define Y_HOME_POS ((Y_MAX_LENGTH) * (Y_HOME_DIR) * 0.5)
125
+      #define Y_HOME_POS ((Y_BED_SIZE) * (Y_HOME_DIR) * 0.5)
107 126
     #endif
108 127
   #else
109 128
     #if ENABLED(DELTA)
110
-      #define Y_HOME_POS (Y_MIN_POS + (Y_MAX_LENGTH) * 0.5)
129
+      #define Y_HOME_POS (Y_MIN_POS + (Y_BED_SIZE) * 0.5)
111 130
     #else
112 131
       #define Y_HOME_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS)
113 132
     #endif
@@ -151,10 +170,10 @@
151 170
    */
152 171
   #if ENABLED(Z_SAFE_HOMING)
153 172
     #ifndef Z_SAFE_HOMING_X_POINT
154
-      #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)
173
+      #define Z_SAFE_HOMING_X_POINT X_CENTER
155 174
     #endif
156 175
     #ifndef Z_SAFE_HOMING_Y_POINT
157
-      #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)
176
+      #define Z_SAFE_HOMING_Y_POINT Y_CENTER
158 177
     #endif
159 178
     #define X_TILT_FULCRUM Z_SAFE_HOMING_X_POINT
160 179
     #define Y_TILT_FULCRUM Z_SAFE_HOMING_Y_POINT
@@ -792,25 +811,40 @@
792 811
     #define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT
793 812
   #endif
794 813
 
814
+  /**
815
+   * Bed Probing rectangular bounds
816
+   * These can be further constrained in code for Delta and SCARA
817
+   */
795 818
   #if ENABLED(DELTA)
796
-    // These will be further constrained in code, but UBL_PROBE_PT values
797
-    // cannot be compile-time verified within the radius.
798
-    #define MIN_PROBE_X (-DELTA_PRINTABLE_RADIUS)
799
-    #define MAX_PROBE_X ( DELTA_PRINTABLE_RADIUS)
800
-    #define MIN_PROBE_Y (-DELTA_PRINTABLE_RADIUS)
801
-    #define MAX_PROBE_Y ( DELTA_PRINTABLE_RADIUS)
819
+    #ifndef DELTA_PROBEABLE_RADIUS
820
+      #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
821
+    #endif
822
+    // Probing points may be verified at compile time within the radius
823
+    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
824
+    // so that may be added to SanityCheck.h in the future.
825
+    #define MIN_PROBE_X (X_CENTER - (DELTA_PROBEABLE_RADIUS))
826
+    #define MIN_PROBE_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS))
827
+    #define MAX_PROBE_X (X_CENTER +  DELTA_PROBEABLE_RADIUS)
828
+    #define MAX_PROBE_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS)
802 829
   #elif IS_SCARA
803 830
     #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
804
-    #define MIN_PROBE_X (-SCARA_PRINTABLE_RADIUS)
805
-    #define MAX_PROBE_X ( SCARA_PRINTABLE_RADIUS)
806
-    #define MIN_PROBE_Y (-SCARA_PRINTABLE_RADIUS)
807
-    #define MAX_PROBE_Y ( SCARA_PRINTABLE_RADIUS)
831
+    #define MIN_PROBE_X (X_CENTER - (SCARA_PRINTABLE_RADIUS))
832
+    #define MIN_PROBE_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS))
833
+    #define MAX_PROBE_X (X_CENTER +  SCARA_PRINTABLE_RADIUS)
834
+    #define MAX_PROBE_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS)
808 835
   #else
809
-    // Boundaries for probing based on set limits
810
-    #define MIN_PROBE_X (max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
811
-    #define MAX_PROBE_X (min(X_MAX_POS, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
812
-    #define MIN_PROBE_Y (max(Y_MIN_POS, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
813
-    #define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
836
+    // Boundaries for Cartesian probing based on set limits
837
+    #if ENABLED(BED_CENTER_AT_0_0)
838
+      #define MIN_PROBE_X (max(X_PROBE_OFFSET_FROM_EXTRUDER, 0) - (X_BED_SIZE) / 2)
839
+      #define MIN_PROBE_Y (max(Y_PROBE_OFFSET_FROM_EXTRUDER, 0) - (Y_BED_SIZE) / 2)
840
+      #define MAX_PROBE_X (min(X_BED_SIZE + X_PROBE_OFFSET_FROM_EXTRUDER, X_BED_SIZE) - (X_BED_SIZE) / 2)
841
+      #define MAX_PROBE_Y (min(Y_BED_SIZE + Y_PROBE_OFFSET_FROM_EXTRUDER, Y_BED_SIZE) - (Y_BED_SIZE) / 2)
842
+    #else
843
+      #define MIN_PROBE_X (max(X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER, 0))
844
+      #define MIN_PROBE_Y (max(Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER, 0))
845
+      #define MAX_PROBE_X (min(X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER, X_BED_SIZE))
846
+      #define MAX_PROBE_Y (min(Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER, Y_BED_SIZE))
847
+    #endif
814 848
   #endif
815 849
 
816 850
   // Stepper pulse duration, in cycles
@@ -835,7 +869,7 @@
835 869
   #endif
836 870
 
837 871
   /**
838
-   * DELTA_SEGMENT_MIN_LENGTH and DELTA_PROBEABLE_RADIUS for UBL_DELTA
872
+   * DELTA_SEGMENT_MIN_LENGTH for UBL_DELTA
839 873
    */
840 874
   #if UBL_DELTA
841 875
     #ifndef DELTA_SEGMENT_MIN_LENGTH
@@ -847,9 +881,6 @@
847 881
         #define DELTA_SEGMENT_MIN_LENGTH 1.00 // mm (similar to G2/G3 arc segmentation)
848 882
       #endif
849 883
     #endif
850
-    #ifndef DELTA_PROBEABLE_RADIUS
851
-      #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
852
-    #endif
853 884
   #endif
854 885
 
855 886
   // Shorthand

+ 9
- 5
Marlin/Configuration.h View File

@@ -755,12 +755,16 @@
755 755
 
756 756
 // @section machine
757 757
 
758
-// Travel limits after homing (units are in mm)
758
+// The size of the print bed
759
+#define X_BED_SIZE 200
760
+#define Y_BED_SIZE 200
761
+
762
+// Travel limits (mm) after homing, corresponding to endstop positions.
759 763
 #define X_MIN_POS 0
760 764
 #define Y_MIN_POS 0
761 765
 #define Z_MIN_POS 0
762
-#define X_MAX_POS 200
763
-#define Y_MAX_POS 200
766
+#define X_MAX_POS X_BED_SIZE
767
+#define Y_MAX_POS Y_BED_SIZE
764 768
 #define Z_MAX_POS 200
765 769
 
766 770
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -968,8 +972,8 @@
968 972
 //#define Z_SAFE_HOMING
969 973
 
970 974
 #if ENABLED(Z_SAFE_HOMING)
971
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
972
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
975
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
976
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
973 977
 #endif
974 978
 
975 979
 // Homing speeds (mm/m)

+ 12
- 11
Marlin/Marlin_main.cpp View File

@@ -456,8 +456,8 @@ float filament_size[EXTRUDERS], volumetric_multiplier[EXTRUDERS];
456 456
 #if HAS_SOFTWARE_ENDSTOPS
457 457
   bool soft_endstops_enabled = true;
458 458
 #endif
459
-float soft_endstop_min[XYZ] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS },
460
-      soft_endstop_max[XYZ] = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS };
459
+float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS },
460
+      soft_endstop_max[XYZ] = { X_MAX_BED, Y_MAX_BED, Z_MAX_POS };
461 461
 
462 462
 #if FAN_COUNT > 0
463 463
   int16_t fanSpeeds[FAN_COUNT] = { 0 };
@@ -6905,15 +6905,16 @@ inline void gcode_M42() {
6905 6905
 
6906 6906
     for (uint8_t n = 0; n < n_samples; n++) {
6907 6907
       if (n_legs) {
6908
-        int dir = (random(0, 10) > 5.0) ? -1 : 1;  // clockwise or counter clockwise
6909
-        float angle = random(0.0, 360.0),
6910
-              radius = random(
6911
-                #if ENABLED(DELTA)
6912
-                  DELTA_PROBEABLE_RADIUS / 8, DELTA_PROBEABLE_RADIUS / 3
6913
-                #else
6914
-                  5, X_MAX_LENGTH / 8
6915
-                #endif
6916
-              );
6908
+        const int dir = (random(0, 10) > 5.0) ? -1 : 1;  // clockwise or counter clockwise
6909
+        float angle = random(0.0, 360.0);
6910
+        const float radius = random(
6911
+          #if ENABLED(DELTA)
6912
+            0.1250000000 * (DELTA_PROBEABLE_RADIUS),
6913
+            0.3333333333 * (DELTA_PROBEABLE_RADIUS)
6914
+          #else
6915
+            5.0, 0.125 * min(X_BED_SIZE, Y_BED_SIZE)
6916
+          #endif
6917
+        );
6917 6918
 
6918 6919
         if (verbose_level > 3) {
6919 6920
           SERIAL_ECHOPAIR("Starting radius: ", radius);

+ 3
- 1
Marlin/SanityCheck.h View File

@@ -50,7 +50,9 @@
50 50
 /**
51 51
  * Warnings for old configurations
52 52
  */
53
-#if WATCH_TEMP_PERIOD > 500
53
+#if !defined(X_BED_SIZE) || !defined(Y_BED_SIZE)
54
+  #error "X_BED_SIZE and BED_Y_SIZE are now required! Please update your configuration."
55
+#elif WATCH_TEMP_PERIOD > 500
54 56
   #error "WATCH_TEMP_PERIOD now uses seconds instead of milliseconds."
55 57
 #elif DISABLED(THERMAL_PROTECTION_HOTENDS) && (defined(WATCH_TEMP_PERIOD) || defined(THERMAL_PROTECTION_PERIOD))
56 58
   #error "Thermal Runaway Protection for hotends is now enabled with THERMAL_PROTECTION_HOTENDS."

+ 9
- 5
Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h View File

@@ -770,12 +770,16 @@
770 770
 
771 771
 // @section machine
772 772
 
773
-// Travel limits after homing (units are in mm)
773
+// The size of the print bed
774
+#define X_BED_SIZE 298
775
+#define Y_BED_SIZE 275
776
+
777
+// Travel limits (mm) after homing, corresponding to endstop positions.
774 778
 #define X_MIN_POS 0
775 779
 #define Y_MIN_POS 0
776 780
 #define Z_MIN_POS 0
777
-#define X_MAX_POS 298
778
-#define Y_MAX_POS 275
781
+#define X_MAX_POS X_BED_SIZE
782
+#define Y_MAX_POS Y_BED_SIZE
779 783
 #define Z_MAX_POS 250
780 784
 
781 785
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -983,8 +987,8 @@
983 987
 //#define Z_SAFE_HOMING
984 988
 
985 989
 #if ENABLED(Z_SAFE_HOMING)
986
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
987
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
990
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
991
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
988 992
 #endif
989 993
 
990 994
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/AliExpress/CL-260/Configuration.h View File

@@ -752,12 +752,16 @@
752 752
 
753 753
 // @section machine
754 754
 
755
-// Travel limits after homing (units are in mm)
755
+// The size of the print bed
756
+#define X_BED_SIZE 220
757
+#define Y_BED_SIZE 220
758
+
759
+// Travel limits (mm) after homing, corresponding to endstop positions.
756 760
 #define X_MIN_POS 0
757 761
 #define Y_MIN_POS 0
758 762
 #define Z_MIN_POS 0
759
-#define X_MAX_POS 220
760
-#define Y_MAX_POS 220
763
+#define X_MAX_POS X_BED_SIZE
764
+#define Y_MAX_POS Y_BED_SIZE
761 765
 #define Z_MAX_POS 260
762 766
 
763 767
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -965,8 +969,8 @@
965 969
 //#define Z_SAFE_HOMING
966 970
 
967 971
 #if ENABLED(Z_SAFE_HOMING)
968
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
969
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
972
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
973
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
970 974
 #endif
971 975
 
972 976
 // Homing speeds (mm/m)

+ 35
- 30
Marlin/example_configurations/Anet/A6/Configuration.h View File

@@ -839,47 +839,52 @@
839 839
 
840 840
 // @section machine
841 841
 
842
-// Travel limits after homing (units are in mm)
842
+// The size of the print bed
843
+//#define X_BED_SIZE 200
844
+//#define Y_BED_SIZE 200
845
+
846
+// Travel limits (mm) after homing, corresponding to endstop positions.
843 847
 //#define X_MIN_POS 0
844 848
 //#define Y_MIN_POS 0
849
+//#define X_MAX_POS X_BED_SIZE
850
+//#define Y_MAX_POS Y_BED_SIZE
845 851
 //#define Z_MIN_POS 0
846
-//#define X_MAX_POS 200
847
-//#define Y_MAX_POS 200
848 852
 //#define Z_MAX_POS 200
849 853
 
850 854
 // ANET A6 Firmware V2.0 defaults:
851
-//#define X_MIN_POS     0
852
-//#define Y_MIN_POS     0
853
-//#define Z_MIN_POS     0
854
-//#define X_MAX_POS     220
855
-//#define Y_MAX_POS     220
856
-//#define Z_MAX_POS     250
855
+//#define X_BED_SIZE 220
856
+//#define Y_BED_SIZE 220
857
+//#define X_MIN_POS 0
858
+//#define Y_MIN_POS 0
859
+//#define Z_MIN_POS 0
860
+//#define Z_MAX_POS 250
857 861
 
858 862
 // ANET A6, X0/Y0 0 front left bed edge :
859
-#define X_MIN_POS     -3
860
-#define Y_MIN_POS     -5
861
-#define Z_MIN_POS     0
862
-#define X_MAX_POS     222
863
-#define Y_MAX_POS     222
864
-#define Z_MAX_POS     230
863
+#define X_BED_SIZE 222
864
+#define Y_BED_SIZE 222
865
+#define X_MIN_POS -3
866
+#define Y_MIN_POS -5
867
+#define Z_MIN_POS 0
868
+#define Z_MAX_POS 230
865 869
 
866 870
 // ANET A6 with new X-Axis / modded Y-Axis:
867
-//#define X_MIN_POS     0
868
-//#define Y_MIN_POS     0
869
-//#define Z_MIN_POS     0
870
-//#define X_MAX_POS     235
871
-//#define Y_MAX_POS     230
872
-//#define Z_MAX_POS     230
871
+//#define X_BED_SIZE 235
872
+//#define Y_BED_SIZE 230
873
+//#define X_MIN_POS 0
874
+//#define Y_MIN_POS 0
875
+//#define Z_MIN_POS 0
876
+//#define Z_MAX_POS 230
873 877
 
874 878
 // ANET A6 with new X-Axis / modded Y-Axis, X0/Y0 0 front left bed edge :
875
-//#define X_MIN_POS     -8
876
-//#define Y_MIN_POS     -6
877
-//#define Z_MIN_POS     0
878
-//#define X_MAX_POS     227
879
-//#define Y_MAX_POS     224
880
-//#define Z_MAX_POS     230
881
-
879
+//#define X_BED_SIZE 227
880
+//#define Y_BED_SIZE 224
881
+//#define X_MIN_POS -8
882
+//#define Y_MIN_POS -6
883
+//#define Z_MIN_POS 0
884
+//#define Z_MAX_POS 230
882 885
 
886
+#define X_MAX_POS X_BED_SIZE
887
+#define Y_MAX_POS Y_BED_SIZE
883 888
 
884 889
 // If enabled, axes won't move below MIN_POS in response to movement commands.
885 890
 #define MIN_SOFTWARE_ENDSTOPS
@@ -1115,8 +1120,8 @@
1115 1120
 #define Z_SAFE_HOMING
1116 1121
 
1117 1122
 #if ENABLED(Z_SAFE_HOMING)
1118
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
1119
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
1123
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
1124
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1120 1125
 
1121 1126
   //Anet A6 with new X-Axis
1122 1127
   //#define Z_SAFE_HOMING_X_POINT 113    // X point for Z homing when homing all axis (G28).

+ 9
- 5
Marlin/example_configurations/Anet/A8/Configuration.h View File

@@ -761,12 +761,16 @@
761 761
 
762 762
 // @section machine
763 763
 
764
-// Travel limits after homing (units are in mm)
764
+// The size of the print bed
765
+#define X_BED_SIZE 220
766
+#define Y_BED_SIZE 220
767
+
768
+// Travel limits (mm) after homing, corresponding to endstop positions.
765 769
 #define X_MIN_POS -33
766 770
 #define Y_MIN_POS -10
767 771
 #define Z_MIN_POS 0
768
-#define X_MAX_POS 220
769
-#define Y_MAX_POS 220
772
+#define X_MAX_POS X_BED_SIZE
773
+#define Y_MAX_POS Y_BED_SIZE
770 774
 #define Z_MAX_POS 240
771 775
 
772 776
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -974,8 +978,8 @@
974 978
 //#define Z_SAFE_HOMING
975 979
 
976 980
 #if ENABLED(Z_SAFE_HOMING)
977
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
978
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
981
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
982
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
979 983
 #endif
980 984
 
981 985
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/BQ/Hephestos/Configuration.h View File

@@ -741,12 +741,16 @@
741 741
 
742 742
 // @section machine
743 743
 
744
-// Travel limits after homing (units are in mm)
744
+// The size of the print bed
745
+#define X_BED_SIZE 215
746
+#define Y_BED_SIZE 210
747
+
748
+// Travel limits (mm) after homing, corresponding to endstop positions.
745 749
 #define X_MIN_POS 0
746 750
 #define Y_MIN_POS 0
747 751
 #define Z_MIN_POS 0
748
-#define X_MAX_POS 215
749
-#define Y_MAX_POS 210
752
+#define X_MAX_POS X_BED_SIZE
753
+#define Y_MAX_POS Y_BED_SIZE
750 754
 #define Z_MAX_POS 180
751 755
 
752 756
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -954,8 +958,8 @@
954 958
 //#define Z_SAFE_HOMING
955 959
 
956 960
 #if ENABLED(Z_SAFE_HOMING)
957
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
958
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
961
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
962
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
959 963
 #endif
960 964
 
961 965
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/BQ/Hephestos_2/Configuration.h View File

@@ -752,12 +752,16 @@
752 752
 
753 753
 // @section machine
754 754
 
755
-// Travel limits after homing (units are in mm)
755
+// The size of the print bed
756
+#define X_BED_SIZE 210
757
+#define Y_BED_SIZE 297
758
+
759
+// Travel limits (mm) after homing, corresponding to endstop positions.
756 760
 #define X_MIN_POS 0
757 761
 #define Y_MIN_POS 0
758 762
 #define Z_MIN_POS 0
759
-#define X_MAX_POS 210
760
-#define Y_MAX_POS 297
763
+#define X_MAX_POS X_BED_SIZE
764
+#define Y_MAX_POS Y_BED_SIZE
761 765
 #define Z_MAX_POS 210
762 766
 
763 767
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -965,8 +969,8 @@
965 969
 #define Z_SAFE_HOMING
966 970
 
967 971
 #if ENABLED(Z_SAFE_HOMING)
968
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
969
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
972
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
973
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
970 974
 #endif
971 975
 
972 976
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/BQ/WITBOX/Configuration.h View File

@@ -741,12 +741,16 @@
741 741
 
742 742
 // @section machine
743 743
 
744
-// Travel limits after homing (units are in mm)
744
+// The size of the print bed
745
+#define X_BED_SIZE 297
746
+#define Y_BED_SIZE 210
747
+
748
+// Travel limits (mm) after homing, corresponding to endstop positions.
745 749
 #define X_MIN_POS 0
746 750
 #define Y_MIN_POS 0
747 751
 #define Z_MIN_POS 0
748
-#define X_MAX_POS 297
749
-#define Y_MAX_POS 210
752
+#define X_MAX_POS X_BED_SIZE
753
+#define Y_MAX_POS Y_BED_SIZE
750 754
 #define Z_MAX_POS 200
751 755
 
752 756
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -954,8 +958,8 @@
954 958
 //#define Z_SAFE_HOMING
955 959
 
956 960
 #if ENABLED(Z_SAFE_HOMING)
957
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
958
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
961
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
962
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
959 963
 #endif
960 964
 
961 965
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/Cartesio/Configuration.h View File

@@ -749,12 +749,16 @@
749 749
 
750 750
 // @section machine
751 751
 
752
-// Travel limits after homing (units are in mm)
752
+// The size of the print bed
753
+#define X_BED_SIZE 435
754
+#define Y_BED_SIZE 270
755
+
756
+// Travel limits (mm) after homing, corresponding to endstop positions.
753 757
 #define X_MIN_POS 0
754 758
 #define Y_MIN_POS 0
755 759
 #define Z_MIN_POS 0
756
-#define X_MAX_POS 435
757
-#define Y_MAX_POS 270
760
+#define X_MAX_POS X_BED_SIZE
761
+#define Y_MAX_POS Y_BED_SIZE
758 762
 #define Z_MAX_POS 400
759 763
 
760 764
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -962,8 +966,8 @@
962 966
 //#define Z_SAFE_HOMING
963 967
 
964 968
 #if ENABLED(Z_SAFE_HOMING)
965
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
966
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
969
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
970
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
967 971
 #endif
968 972
 
969 973
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/Creality/CR-10/Configuration.h View File

@@ -765,12 +765,16 @@
765 765
 
766 766
 // @section machine
767 767
 
768
-// Travel limits after homing (units are in mm)
768
+// The size of the print bed
769
+#define X_BED_SIZE 300
770
+#define Y_BED_SIZE 300
771
+
772
+// Travel limits (mm) after homing, corresponding to endstop positions.
769 773
 #define X_MIN_POS 0
770 774
 #define Y_MIN_POS 0
771 775
 #define Z_MIN_POS 0
772
-#define X_MAX_POS 300
773
-#define Y_MAX_POS 300
776
+#define X_MAX_POS X_BED_SIZE
777
+#define Y_MAX_POS Y_BED_SIZE
774 778
 #define Z_MAX_POS 400
775 779
 
776 780
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -977,8 +981,8 @@
977 981
 //#define Z_SAFE_HOMING
978 982
 
979 983
 #if ENABLED(Z_SAFE_HOMING)
980
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
981
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
984
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
985
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
982 986
 #endif
983 987
 
984 988
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/Felix/Configuration.h View File

@@ -733,12 +733,16 @@
733 733
 
734 734
 // @section machine
735 735
 
736
-// Travel limits after homing (units are in mm)
736
+// The size of the print bed
737
+#define X_BED_SIZE 255
738
+#define Y_BED_SIZE 205
739
+
740
+// Travel limits (mm) after homing, corresponding to endstop positions.
737 741
 #define X_MIN_POS 0
738 742
 #define Y_MIN_POS 0
739 743
 #define Z_MIN_POS 0
740
-#define X_MAX_POS 255
741
-#define Y_MAX_POS 205
744
+#define X_MAX_POS X_BED_SIZE
745
+#define Y_MAX_POS Y_BED_SIZE
742 746
 #define Z_MAX_POS 235
743 747
 
744 748
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -946,8 +950,8 @@
946 950
 //#define Z_SAFE_HOMING
947 951
 
948 952
 #if ENABLED(Z_SAFE_HOMING)
949
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
950
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
953
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
954
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
951 955
 #endif
952 956
 
953 957
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/Felix/DUAL/Configuration.h View File

@@ -733,12 +733,16 @@
733 733
 
734 734
 // @section machine
735 735
 
736
-// Travel limits after homing (units are in mm)
736
+// The size of the print bed
737
+#define X_BED_SIZE 255
738
+#define Y_BED_SIZE 205
739
+
740
+// Travel limits (mm) after homing, corresponding to endstop positions.
737 741
 #define X_MIN_POS 0
738 742
 #define Y_MIN_POS 0
739 743
 #define Z_MIN_POS 0
740
-#define X_MAX_POS 255
741
-#define Y_MAX_POS 205
744
+#define X_MAX_POS X_BED_SIZE
745
+#define Y_MAX_POS Y_BED_SIZE
742 746
 #define Z_MAX_POS 235
743 747
 
744 748
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -946,8 +950,8 @@
946 950
 //#define Z_SAFE_HOMING
947 951
 
948 952
 #if ENABLED(Z_SAFE_HOMING)
949
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
950
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
953
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
954
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
951 955
 #endif
952 956
 
953 957
 // Homing speeds (mm/m)

+ 10
- 5
Marlin/example_configurations/Folger Tech/i3-2020/Configuration.h View File

@@ -754,13 +754,18 @@
754 754
 
755 755
 // @section machine
756 756
 
757
-// Travel limits after homing (units are in mm)
757
+// The size of the print bed
758
+#define X_BED_SIZE 207
759
+#define Y_BED_SIZE 182
760
+
761
+// Travel limits (mm) after homing, corresponding to endstop positions.
758 762
 #define X_MIN_POS 6
759 763
 #define Y_MIN_POS 3
760 764
 #define Z_MIN_POS 0
761
-#define X_MAX_POS 207
762
-#define Y_MAX_POS 182
765
+#define X_MAX_POS X_BED_SIZE
766
+#define Y_MAX_POS Y_BED_SIZE
763 767
 #define Z_MAX_POS 175
768
+
764 769
 // If enabled, axes won't move below MIN_POS in response to movement commands.
765 770
 //#define MIN_SOFTWARE_ENDSTOPS
766 771
 // If enabled, axes won't move above MAX_POS in response to movement commands.
@@ -968,8 +973,8 @@
968 973
 #define Z_SAFE_HOMING
969 974
 
970 975
 #if ENABLED(Z_SAFE_HOMING)
971
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
972
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
976
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
977
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
973 978
 #endif
974 979
 
975 980
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/Infitary/i3-M508/Configuration.h View File

@@ -759,12 +759,16 @@
759 759
 
760 760
 // @section machine
761 761
 
762
-// Travel limits after homing (units are in mm)
762
+// The size of the print bed
763
+#define X_BED_SIZE 205
764
+#define Y_BED_SIZE 205
765
+
766
+// Travel limits (mm) after homing, corresponding to endstop positions.
763 767
 #define X_MIN_POS 0
764 768
 #define Y_MIN_POS 0
765 769
 #define Z_MIN_POS 0
766
-#define X_MAX_POS 205
767
-#define Y_MAX_POS 205
770
+#define X_MAX_POS X_BED_SIZE
771
+#define Y_MAX_POS Y_BED_SIZE
768 772
 #define Z_MAX_POS 185
769 773
 
770 774
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -972,8 +976,8 @@
972 976
 //#define Z_SAFE_HOMING
973 977
 
974 978
 #if ENABLED(Z_SAFE_HOMING)
975
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
976
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
979
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
980
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
977 981
 #endif
978 982
 
979 983
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/Malyan/M150/Configuration.h View File

@@ -774,12 +774,16 @@
774 774
 
775 775
 // @section machine
776 776
 
777
-// Travel limits after homing (units are in mm)
777
+// The size of the print bed
778
+#define X_BED_SIZE 200
779
+#define Y_BED_SIZE 200
780
+
781
+// Travel limits (mm) after homing, corresponding to endstop positions.
778 782
 #define X_MIN_POS 0
779 783
 #define Y_MIN_POS 0
780 784
 #define Z_MIN_POS 0
781
-#define X_MAX_POS 200
782
-#define Y_MAX_POS 200
785
+#define X_MAX_POS X_BED_SIZE
786
+#define Y_MAX_POS Y_BED_SIZE
783 787
 #define Z_MAX_POS 180
784 788
 
785 789
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -991,8 +995,8 @@
991 995
 //#define Z_SAFE_HOMING
992 996
 
993 997
 #if ENABLED(Z_SAFE_HOMING)
994
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
995
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
998
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
999
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
996 1000
 #endif
997 1001
 
998 1002
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

@@ -751,12 +751,16 @@
751 751
 
752 752
 // @section machine
753 753
 
754
-// Travel limits after homing (units are in mm)
754
+// The size of the print bed
755
+#define X_BED_SIZE 200
756
+#define Y_BED_SIZE 200
757
+
758
+// Travel limits (mm) after homing, corresponding to endstop positions.
755 759
 #define X_MIN_POS 0
756 760
 #define Y_MIN_POS 0
757 761
 #define Z_MIN_POS 0
758
-#define X_MAX_POS 200
759
-#define Y_MAX_POS 200
762
+#define X_MAX_POS X_BED_SIZE
763
+#define Y_MAX_POS Y_BED_SIZE
760 764
 #define Z_MAX_POS 200
761 765
 
762 766
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -964,8 +968,8 @@
964 968
 //#define Z_SAFE_HOMING
965 969
 
966 970
 #if ENABLED(Z_SAFE_HOMING)
967
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
968
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
971
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
972
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
969 973
 #endif
970 974
 
971 975
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/RigidBot/Configuration.h View File

@@ -749,12 +749,16 @@
749 749
 
750 750
 // @section machine
751 751
 
752
-// Travel limits after homing (units are in mm)
752
+// The size of the print bed
753
+#define X_BED_SIZE 254  // RigidBot regular is 254mm, RigitBot Big is 406mm
754
+#define Y_BED_SIZE 248  // RigidBot regular is 248mm, RigitBot Big is 304mm
755
+
756
+// Travel limits (mm) after homing, corresponding to endstop positions.
753 757
 #define X_MIN_POS 0
754 758
 #define Y_MIN_POS 0
755 759
 #define Z_MIN_POS 0
756
-#define X_MAX_POS 254  // RigidBot regular is 254mm, RigitBot Big is 406mm
757
-#define Y_MAX_POS 248  // RigidBot regular is 248mm, RigitBot Big is 304mm
760
+#define X_MAX_POS X_BED_SIZE
761
+#define Y_MAX_POS Y_BED_SIZE
758 762
 #define Z_MAX_POS 254  // RigidBot regular and Big are 254mm
759 763
 
760 764
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -962,8 +966,8 @@
962 966
 //#define Z_SAFE_HOMING
963 967
 
964 968
 #if ENABLED(Z_SAFE_HOMING)
965
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
966
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
969
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
970
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
967 971
 #endif
968 972
 
969 973
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -763,12 +763,16 @@
763 763
 
764 764
 // @section machine
765 765
 
766
-// Travel limits after homing (units are in mm)
766
+// The size of the print bed
767
+#define X_BED_SIZE 200
768
+#define Y_BED_SIZE 200
769
+
770
+// Travel limits (mm) after homing, corresponding to endstop positions.
767 771
 #define X_MIN_POS 0
768 772
 #define Y_MIN_POS 0
769 773
 #define Z_MIN_POS MANUAL_Z_HOME_POS
770
-#define X_MAX_POS 200
771
-#define Y_MAX_POS 200
774
+#define X_MAX_POS X_BED_SIZE
775
+#define Y_MAX_POS Y_BED_SIZE
772 776
 #define Z_MAX_POS 225
773 777
 
774 778
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -976,8 +980,8 @@
976 980
 //#define Z_SAFE_HOMING
977 981
 
978 982
 #if ENABLED(Z_SAFE_HOMING)
979
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
980
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
983
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
984
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
981 985
 #endif
982 986
 
983 987
 // Homing speeds (mm/m)

+ 10
- 6
Marlin/example_configurations/TinyBoy2/Configuration.h View File

@@ -802,13 +802,17 @@
802 802
 
803 803
 // @section machine
804 804
 
805
-// Travel limits after homing (units are in mm)
805
+// The size of the print bed
806
+// Tinyboy2: 100mm are marketed, actual length between endstop and end of rail is 98mm
807
+#define X_BED_SIZE 98
808
+#define Y_BED_SIZE 98
809
+
810
+// Travel limits (mm) after homing, corresponding to endstop positions.
806 811
 #define X_MIN_POS 0
807 812
 #define Y_MIN_POS 0
808 813
 #define Z_MIN_POS 0
809
-// Tinyboy2: 100mm are marketed, actual length between endstop and end of rail is 98mm
810
-#define X_MAX_POS 98
811
-#define Y_MAX_POS 98
814
+#define X_MAX_POS X_BED_SIZE
815
+#define Y_MAX_POS Y_BED_SIZE
812 816
 #if ENABLED(TB2_L10)
813 817
   #define Z_MAX_POS 98
814 818
 #else
@@ -1020,8 +1024,8 @@
1020 1024
 //#define Z_SAFE_HOMING
1021 1025
 
1022 1026
 #if ENABLED(Z_SAFE_HOMING)
1023
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
1024
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
1027
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
1028
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
1025 1029
 #endif
1026 1030
 
1027 1031
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/Velleman/K8200/Configuration.h View File

@@ -780,12 +780,16 @@
780 780
 
781 781
 // @section machine
782 782
 
783
-// Travel limits after homing (units are in mm)
783
+// The size of the print bed
784
+#define X_BED_SIZE 200
785
+#define Y_BED_SIZE 200
786
+
787
+// Travel limits (mm) after homing, corresponding to endstop positions.
784 788
 #define X_MIN_POS 0
785 789
 #define Y_MIN_POS 0
786 790
 #define Z_MIN_POS 0
787
-#define X_MAX_POS 200
788
-#define Y_MAX_POS 200
791
+#define X_MAX_POS X_BED_SIZE
792
+#define Y_MAX_POS Y_BED_SIZE
789 793
 #define Z_MAX_POS 200
790 794
 
791 795
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -993,8 +997,8 @@
993 997
 //#define Z_SAFE_HOMING
994 998
 
995 999
 #if ENABLED(Z_SAFE_HOMING)
996
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
997
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
1000
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
1001
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
998 1002
 #endif
999 1003
 
1000 1004
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/Velleman/K8400/Configuration.h View File

@@ -751,12 +751,16 @@
751 751
 
752 752
 // @section machine
753 753
 
754
-// Travel limits after homing (units are in mm)
754
+// The size of the print bed
755
+#define X_BED_SIZE 200
756
+#define Y_BED_SIZE 200
757
+
758
+// Travel limits (mm) after homing, corresponding to endstop positions.
755 759
 #define X_MIN_POS 0
756 760
 #define Y_MIN_POS 20
757 761
 #define Z_MIN_POS 0
758
-#define X_MAX_POS 200
759
-#define Y_MAX_POS 200
762
+#define X_MAX_POS X_BED_SIZE
763
+#define Y_MAX_POS Y_BED_SIZE
760 764
 #define Z_MAX_POS 190
761 765
 
762 766
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -964,8 +968,8 @@
964 968
 //#define Z_SAFE_HOMING
965 969
 
966 970
 #if ENABLED(Z_SAFE_HOMING)
967
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
968
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
971
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
972
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
969 973
 #endif
970 974
 
971 975
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h View File

@@ -751,12 +751,16 @@
751 751
 
752 752
 // @section machine
753 753
 
754
-// Travel limits after homing (units are in mm)
754
+// The size of the print bed
755
+#define X_BED_SIZE 200
756
+#define Y_BED_SIZE 200
757
+
758
+// Travel limits (mm) after homing, corresponding to endstop positions.
755 759
 #define X_MIN_POS 0
756 760
 #define Y_MIN_POS 20
757 761
 #define Z_MIN_POS 0
758
-#define X_MAX_POS 200
759
-#define Y_MAX_POS 200
762
+#define X_MAX_POS X_BED_SIZE
763
+#define Y_MAX_POS Y_BED_SIZE
760 764
 #define Z_MAX_POS 190
761 765
 
762 766
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -964,8 +968,8 @@
964 968
 //#define Z_SAFE_HOMING
965 969
 
966 970
 #if ENABLED(Z_SAFE_HOMING)
967
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
968
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
971
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
972
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
969 973
 #endif
970 974
 
971 975
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/adafruit/ST7565/Configuration.h View File

@@ -751,12 +751,16 @@
751 751
 
752 752
 // @section machine
753 753
 
754
-// Travel limits after homing (units are in mm)
754
+// The size of the print bed
755
+#define X_BED_SIZE 200
756
+#define Y_BED_SIZE 200
757
+
758
+// Travel limits (mm) after homing, corresponding to endstop positions.
755 759
 #define X_MIN_POS 0
756 760
 #define Y_MIN_POS 0
757 761
 #define Z_MIN_POS 0
758
-#define X_MAX_POS 200
759
-#define Y_MAX_POS 200
762
+#define X_MAX_POS X_BED_SIZE
763
+#define Y_MAX_POS Y_BED_SIZE
760 764
 #define Z_MAX_POS 200
761 765
 
762 766
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -964,8 +968,8 @@
964 968
 //#define Z_SAFE_HOMING
965 969
 
966 970
 #if ENABLED(Z_SAFE_HOMING)
967
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
968
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
971
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
972
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
969 973
 #endif
970 974
 
971 975
 // Homing speeds (mm/m)

+ 5
- 1
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h View File

@@ -875,7 +875,11 @@
875 875
 
876 876
 // @section machine
877 877
 
878
-// Travel limits after homing (units are in mm)
878
+// The size of the print bed
879
+#define X_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2)
880
+#define Y_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2)
881
+
882
+// Travel limits (mm) after homing, corresponding to endstop positions.
879 883
 #define X_MIN_POS -(DELTA_PRINTABLE_RADIUS)
880 884
 #define Y_MIN_POS -(DELTA_PRINTABLE_RADIUS)
881 885
 #define Z_MIN_POS 0

+ 5
- 1
Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h View File

@@ -875,7 +875,11 @@
875 875
 
876 876
 // @section machine
877 877
 
878
-// Travel limits after homing (units are in mm)
878
+// The size of the print bed
879
+#define X_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2)
880
+#define Y_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2)
881
+
882
+// Travel limits (mm) after homing, corresponding to endstop positions.
879 883
 #define X_MIN_POS -(DELTA_PRINTABLE_RADIUS)
880 884
 #define Y_MIN_POS -(DELTA_PRINTABLE_RADIUS)
881 885
 #define Z_MIN_POS 0

+ 5
- 1
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -862,7 +862,11 @@
862 862
 
863 863
 // @section machine
864 864
 
865
-// Travel limits after homing (units are in mm)
865
+// The size of the print bed
866
+#define X_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2)
867
+#define Y_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2)
868
+
869
+// Travel limits (mm) after homing, corresponding to endstop positions.
866 870
 #define X_MIN_POS -(DELTA_PRINTABLE_RADIUS)
867 871
 #define Y_MIN_POS -(DELTA_PRINTABLE_RADIUS)
868 872
 #define Z_MIN_POS 0

+ 5
- 1
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

@@ -860,7 +860,11 @@
860 860
 
861 861
 // @section machine
862 862
 
863
-// Travel limits after homing (units are in mm)
863
+// The size of the print bed
864
+#define X_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2)
865
+#define Y_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2)
866
+
867
+// Travel limits (mm) after homing, corresponding to endstop positions.
864 868
 #define X_MIN_POS -(DELTA_PRINTABLE_RADIUS)
865 869
 #define Y_MIN_POS -(DELTA_PRINTABLE_RADIUS)
866 870
 #define Z_MIN_POS 0

+ 5
- 1
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

@@ -865,7 +865,11 @@
865 865
 
866 866
 // @section machine
867 867
 
868
-// Travel limits after homing (units are in mm)
868
+// The size of the print bed
869
+#define X_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2)
870
+#define Y_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2)
871
+
872
+// Travel limits (mm) after homing, corresponding to endstop positions.
869 873
 #define X_MIN_POS -(DELTA_PRINTABLE_RADIUS)
870 874
 #define Y_MIN_POS -(DELTA_PRINTABLE_RADIUS)
871 875
 #define Z_MIN_POS 0

+ 5
- 1
Marlin/example_configurations/delta/kossel_xl/Configuration.h View File

@@ -928,7 +928,11 @@
928 928
 
929 929
 // @section machine
930 930
 
931
-// Travel limits after homing (units are in mm)
931
+// The size of the print bed
932
+#define X_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2)
933
+#define Y_BED_SIZE ((DELTA_PRINTABLE_RADIUS) * 2)
934
+
935
+// Travel limits (mm) after homing, corresponding to endstop positions.
932 936
 #define X_MIN_POS -(DELTA_PRINTABLE_RADIUS)
933 937
 #define Y_MIN_POS -(DELTA_PRINTABLE_RADIUS)
934 938
 #define Z_MIN_POS 0

+ 8
- 4
Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h View File

@@ -766,13 +766,17 @@
766 766
 
767 767
 // @section machine
768 768
 
769
-// Travel limits after homing (units are in mm)
769
+// The size of the print bed
770
+#define X_BED_SIZE 420   // These numbers are not accurate for an unaltered gMax 1.5+ printer.  My print bed
771
+#define Y_BED_SIZE 420   // is inset a noticable amount from the edge of the bed.  Combined with the inset,
772
+                         // the nozzle can reach all cordinates of the mesh.
773
+
774
+// Travel limits (mm) after homing, corresponding to endstop positions.
770 775
 #define X_MIN_POS 0
771 776
 #define Y_MIN_POS 0
772 777
 #define Z_MIN_POS 0
773
-#define X_MAX_POS 420   // These numbers are not accurate for an unaltered gMax 1.5+ printer.  My print bed
774
-#define Y_MAX_POS 420   // is inset a noticable amount from the edge of the bed.  Combined with the inset,
775
-                        // the nozzle can reach all cordinates of the mesh.
778
+#define X_MAX_POS X_BED_SIZE
779
+#define Y_MAX_POS Y_BED_SIZE
776 780
 #define Z_MAX_POS 500
777 781
 
778 782
 // If enabled, axes won't move below MIN_POS in response to movement commands.

+ 9
- 5
Marlin/example_configurations/makibox/Configuration.h View File

@@ -754,12 +754,16 @@
754 754
 
755 755
 // @section machine
756 756
 
757
-// Travel limits after homing (units are in mm)
757
+// The size of the print bed
758
+#define X_BED_SIZE 110
759
+#define Y_BED_SIZE 150
760
+
761
+// Travel limits (mm) after homing, corresponding to endstop positions.
758 762
 #define X_MIN_POS 0
759 763
 #define Y_MIN_POS 0
760 764
 #define Z_MIN_POS 0
761
-#define X_MAX_POS 110
762
-#define Y_MAX_POS 150
765
+#define X_MAX_POS X_BED_SIZE
766
+#define Y_MAX_POS Y_BED_SIZE
763 767
 #define Z_MAX_POS 86
764 768
 
765 769
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -967,8 +971,8 @@
967 971
 //#define Z_SAFE_HOMING
968 972
 
969 973
 #if ENABLED(Z_SAFE_HOMING)
970
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
971
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
974
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
975
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
972 976
 #endif
973 977
 
974 978
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -746,12 +746,16 @@
746 746
 
747 747
 // @section machine
748 748
 
749
-// Travel limits after homing (units are in mm)
749
+// The size of the print bed
750
+#define X_BED_SIZE 205
751
+#define Y_BED_SIZE 205
752
+
753
+// Travel limits (mm) after homing, corresponding to endstop positions.
750 754
 #define X_MIN_POS 0
751 755
 #define Y_MIN_POS 0
752 756
 #define Z_MIN_POS 0
753
-#define X_MAX_POS 205
754
-#define Y_MAX_POS 205
757
+#define X_MAX_POS X_BED_SIZE
758
+#define Y_MAX_POS Y_BED_SIZE
755 759
 #define Z_MAX_POS 120
756 760
 
757 761
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -959,8 +963,8 @@
959 963
 //#define Z_SAFE_HOMING
960 964
 
961 965
 #if ENABLED(Z_SAFE_HOMING)
962
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
963
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
966
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
967
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
964 968
 #endif
965 969
 
966 970
 // Homing speeds (mm/m)

+ 9
- 5
Marlin/example_configurations/wt150/Configuration.h View File

@@ -757,12 +757,16 @@
757 757
 
758 758
 // @section machine
759 759
 
760
-// Travel limits after homing (units are in mm)
760
+// The size of the print bed
761
+#define X_BED_SIZE 150
762
+#define Y_BED_SIZE 150
763
+
764
+// Travel limits (mm) after homing, corresponding to endstop positions.
761 765
 #define X_MIN_POS 0
762 766
 #define Y_MIN_POS 0
763 767
 #define Z_MIN_POS 0
764
-#define X_MAX_POS 150
765
-#define Y_MAX_POS 150
768
+#define X_MAX_POS X_BED_SIZE
769
+#define Y_MAX_POS Y_BED_SIZE
766 770
 #define Z_MAX_POS 143.0
767 771
 
768 772
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -970,8 +974,8 @@
970 974
 //#define Z_SAFE_HOMING
971 975
 
972 976
 #if ENABLED(Z_SAFE_HOMING)
973
-  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
974
-  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
977
+  #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axis (G28).
978
+  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axis (G28).
975 979
 #endif
976 980
 
977 981
 // Homing speeds (mm/m)

+ 4
- 4
Marlin/ubl_G29.cpp View File

@@ -467,8 +467,8 @@
467 467
                 g29_x_pos = X_HOME_POS;
468 468
                 g29_y_pos = Y_HOME_POS;
469 469
               #else // cartesian
470
-                g29_x_pos = X_PROBE_OFFSET_FROM_EXTRUDER > 0 ? X_MAX_POS : X_MIN_POS;
471
-                g29_y_pos = Y_PROBE_OFFSET_FROM_EXTRUDER < 0 ? Y_MAX_POS : Y_MIN_POS;
470
+                g29_x_pos = X_PROBE_OFFSET_FROM_EXTRUDER > 0 ? X_BED_SIZE : 0;
471
+                g29_y_pos = Y_PROBE_OFFSET_FROM_EXTRUDER < 0 ? Y_BED_SIZE : 0;
472 472
               #endif
473 473
             }
474 474
 
@@ -1132,12 +1132,12 @@
1132 1132
       SERIAL_PROTOCOLLNPGM("Both X & Y locations must be specified.\n");
1133 1133
       err_flag = true;
1134 1134
     }
1135
-    if (!WITHIN(RAW_X_POSITION(g29_x_pos), X_MIN_POS, X_MAX_POS)) {
1135
+    if (!WITHIN(RAW_X_POSITION(g29_x_pos), X_MIN_BED, X_MAX_BED)) {
1136 1136
       SERIAL_PROTOCOLLNPGM("Invalid X location specified.\n");
1137 1137
       err_flag = true;
1138 1138
     }
1139 1139
 
1140
-    if (!WITHIN(RAW_Y_POSITION(g29_y_pos), Y_MIN_POS, Y_MAX_POS)) {
1140
+    if (!WITHIN(RAW_Y_POSITION(g29_y_pos), Y_MIN_BED, Y_MAX_BED)) {
1141 1141
       SERIAL_PROTOCOLLNPGM("Invalid Y location specified.\n");
1142 1142
       err_flag = true;
1143 1143
     }

Loading…
Cancel
Save