浏览代码

Merge pull request #6416 from SkyNet3D/negative-mesh-fix

Fix for Meshpositions if printer has negative endstop positions
Scott Lahteine 7 年前
父节点
当前提交
39c6c5621b
共有 1 个文件被更改,包括 20 次插入4 次删除
  1. 20
    4
      Marlin/Configuration_adv.h

+ 20
- 4
Marlin/Configuration_adv.h 查看文件

@@ -645,14 +645,30 @@
645 645
 // Below are the macros that are used to define the borders for the mesh area,
646 646
 // made available here for specialized needs, ie dual extruder setup.
647 647
 #if ENABLED(MESH_BED_LEVELING)
648
-  #define MESH_MIN_X (X_MIN_POS + MESH_INSET)
648
+  #if X_MIN_POS < 0
649
+    #define MESH_MIN_X (MESH_INSET)
650
+  #else
651
+    #define MESH_MIN_X (X_MIN_POS + (MESH_INSET))
652
+  #endif
649 653
   #define MESH_MAX_X (X_MAX_POS - (MESH_INSET))
650
-  #define MESH_MIN_Y (Y_MIN_POS + MESH_INSET)
654
+  #if Y_MIN_POS < 0
655
+    #define MESH_MIN_Y (MESH_INSET)
656
+  #else
657
+    #define MESH_MIN_Y (Y_MIN_POS + (MESH_INSET))
658
+  #endif
651 659
   #define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET))
652 660
 #elif ENABLED(AUTO_BED_LEVELING_UBL)
653
-  #define UBL_MESH_MIN_X (X_MIN_POS + UBL_MESH_INSET)
661
+  #if X_MIN_POS < 0
662
+    #define UBL_MESH_MIN_X (UBL_MESH_INSET)
663
+  #else
664
+    #define UBL_MESH_MIN_X (X_MIN_POS + (UBL_MESH_INSET))
665
+  #endif
654 666
   #define UBL_MESH_MAX_X (X_MAX_POS - (UBL_MESH_INSET))
655
-  #define UBL_MESH_MIN_Y (Y_MIN_POS + UBL_MESH_INSET)
667
+  #if Y_MIN_POS < 0
668
+    #define UBL_MESH_MIN_Y (UBL_MESH_INSET)
669
+  #else
670
+    #define UBL_MESH_MIN_Y (Y_MIN_POS + (UBL_MESH_INSET))
671
+  #endif
656 672
   #define UBL_MESH_MAX_Y (Y_MAX_POS - (UBL_MESH_INSET))
657 673
 
658 674
   // If this is defined, the currently active mesh will be saved in the

正在加载...
取消
保存