Browse Source

Fix mesh bounds for MBL

Scott Lahteine 4 years ago
parent
commit
661c3cfc99
2 changed files with 5 additions and 2 deletions
  1. 2
    2
      Marlin/src/inc/Conditionals_post.h
  2. 3
    0
      Marlin/src/module/probe.h

+ 2
- 2
Marlin/src/inc/Conditionals_post.h View File

@@ -1448,10 +1448,10 @@
1448 1448
 #ifndef MIN_PROBE_EDGE
1449 1449
   #define MIN_PROBE_EDGE 0
1450 1450
 #endif
1451
+
1451 1452
 #ifndef NOZZLE_TO_PROBE_OFFSET
1452 1453
   #define NOZZLE_TO_PROBE_OFFSET { 0, 0, 0 }
1453 1454
 #endif
1454
-constexpr float nozzle_to_probe_offset[XYZ] = NOZZLE_TO_PROBE_OFFSET;
1455 1455
 
1456 1456
 #if ENABLED(DELTA)
1457 1457
   /**
@@ -1514,7 +1514,7 @@ constexpr float nozzle_to_probe_offset[XYZ] = NOZZLE_TO_PROBE_OFFSET;
1514 1514
     #define _MESH_MAX_Y (Y_MAX_BED - (MESH_INSET))
1515 1515
   #else
1516 1516
     // Boundaries for Cartesian probing based on set limits
1517
-    #if ENABLED(AUTO_BED_LEVELING_UBL)
1517
+    #if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
1518 1518
       #define _MESH_MIN_X (_MAX(X_MIN_BED + MESH_INSET, X_MIN_POS))  // UBL is careful not to probe off the bed.  It does not
1519 1519
       #define _MESH_MIN_Y (_MAX(Y_MIN_BED + MESH_INSET, Y_MIN_POS))  // need NOZZLE_TO_PROBE_OFFSET in the mesh dimensions
1520 1520
       #define _MESH_MAX_X (_MIN(X_MAX_BED - (MESH_INSET), X_MAX_POS))

+ 3
- 0
Marlin/src/module/probe.h View File

@@ -29,7 +29,10 @@
29 29
 
30 30
 #if HAS_BED_PROBE
31 31
 
32
+  constexpr float nozzle_to_probe_offset[XYZ] = NOZZLE_TO_PROBE_OFFSET;
33
+
32 34
   extern float probe_offset[XYZ];
35
+
33 36
   bool set_probe_deployed(const bool deploy);
34 37
   #ifdef Z_AFTER_PROBING
35 38
     void move_z_after_probing();

Loading…
Cancel
Save