Bladeren bron

Allow override of probe bounds

Scott Lahteine 6 jaren geleden
bovenliggende
commit
94cb412e45
1 gewijzigde bestanden met toevoegingen van 26 en 12 verwijderingen
  1. 26
    12
      Marlin/src/inc/Conditionals_post.h

+ 26
- 12
Marlin/src/inc/Conditionals_post.h Bestand weergeven

@@ -957,22 +957,36 @@
957 957
   // Probing points may be verified at compile time within the radius
958 958
   // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
959 959
   // so that may be added to SanityCheck.h in the future.
960
-  #define MIN_PROBE_X (X_CENTER - DELTA_PRINTABLE_RADIUS)
961
-  #define MIN_PROBE_Y (Y_CENTER - DELTA_PRINTABLE_RADIUS)
962
-  #define MAX_PROBE_X (X_CENTER + DELTA_PRINTABLE_RADIUS)
963
-  #define MAX_PROBE_Y (Y_CENTER + DELTA_PRINTABLE_RADIUS)
960
+  #define _MIN_PROBE_X (X_CENTER - DELTA_PRINTABLE_RADIUS)
961
+  #define _MIN_PROBE_Y (Y_CENTER - DELTA_PRINTABLE_RADIUS)
962
+  #define _MAX_PROBE_X (X_CENTER + DELTA_PRINTABLE_RADIUS)
963
+  #define _MAX_PROBE_Y (Y_CENTER + DELTA_PRINTABLE_RADIUS)
964 964
 #elif IS_SCARA
965 965
   #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
966
-  #define MIN_PROBE_X (X_CENTER - (SCARA_PRINTABLE_RADIUS))
967
-  #define MIN_PROBE_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS))
968
-  #define MAX_PROBE_X (X_CENTER +  SCARA_PRINTABLE_RADIUS)
969
-  #define MAX_PROBE_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS)
966
+  #define _MIN_PROBE_X (X_CENTER - (SCARA_PRINTABLE_RADIUS))
967
+  #define _MIN_PROBE_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS))
968
+  #define _MAX_PROBE_X (X_CENTER +  SCARA_PRINTABLE_RADIUS)
969
+  #define _MAX_PROBE_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS)
970 970
 #else
971 971
   // Boundaries for Cartesian probing based on bed limits
972
-  #define MIN_PROBE_X (max(X_MIN_BED, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
973
-  #define MIN_PROBE_Y (max(Y_MIN_BED, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
974
-  #define MAX_PROBE_X (min(X_MAX_BED, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
975
-  #define MAX_PROBE_Y (min(Y_MAX_BED, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
972
+  #define _MIN_PROBE_X (max(X_MIN_BED, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
973
+  #define _MIN_PROBE_Y (max(Y_MIN_BED, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
974
+  #define _MAX_PROBE_X (min(X_MAX_BED, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
975
+  #define _MAX_PROBE_Y (min(Y_MAX_BED, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
976
+#endif
977
+
978
+// Allow configuration to override these for special purposes
979
+#ifndef MIN_PROBE_X
980
+  #define MIN_PROBE_X _MIN_PROBE_X
981
+#endif
982
+#ifndef MIN_PROBE_Y
983
+  #define MIN_PROBE_Y _MIN_PROBE_Y
984
+#endif
985
+#ifndef MAX_PROBE_X
986
+  #define MAX_PROBE_X _MAX_PROBE_X
987
+#endif
988
+#ifndef MAX_PROBE_Y
989
+  #define MAX_PROBE_Y _MAX_PROBE_Y
976 990
 #endif
977 991
 
978 992
 /**

Laden…
Annuleren
Opslaan