Browse Source

Correct mesh size calculations

Roxy-3D 7 years ago
parent
commit
9d0cf02fef
No account linked to committer's email address
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      Marlin/src/inc/Conditionals_post.h

+ 4
- 0
Marlin/src/inc/Conditionals_post.h View File

1067
     #if ENABLED(AUTO_BED_LEVELING_UBL)
1067
     #if ENABLED(AUTO_BED_LEVELING_UBL)
1068
       #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
1068
       #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
1069
       #define _MESH_MIN_Y (max(Y_MIN_BED + MESH_INSET, Y_MIN_POS))  // need *_PROBE_OFFSET_FROM_EXTRUDER in the mesh dimensions
1069
       #define _MESH_MIN_Y (max(Y_MIN_BED + MESH_INSET, Y_MIN_POS))  // need *_PROBE_OFFSET_FROM_EXTRUDER in the mesh dimensions
1070
+      #define _MESH_MAX_X (min(X_MAX_BED - (MESH_INSET), X_MAX_POS))
1071
+      #define _MESH_MAX_Y (min(Y_MAX_BED - (MESH_INSET), Y_MAX_POS))
1070
     #else
1072
     #else
1071
       #define _MESH_MIN_X (max(X_MIN_BED + MESH_INSET, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
1073
       #define _MESH_MIN_X (max(X_MIN_BED + MESH_INSET, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
1072
       #define _MESH_MIN_Y (max(Y_MIN_BED + MESH_INSET, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
1074
       #define _MESH_MIN_Y (max(Y_MIN_BED + MESH_INSET, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
1075
+      #define _MESH_MAX_X (min(X_MAX_BED - (MESH_INSET), X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
1076
+      #define _MESH_MAX_Y (min(Y_MAX_BED - (MESH_INSET), Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
1073
     #endif
1077
     #endif
1074
   #endif
1078
   #endif
1075
   /**
1079
   /**

Loading…
Cancel
Save