Edward Patel 9 년 전
부모
커밋
da88b00585
2개의 변경된 파일20개의 추가작업 그리고 4개의 파일을 삭제
  1. 15
    3
      Marlin/Marlin_main.cpp
  2. 5
    1
      Marlin/ultralcd.cpp

+ 15
- 3
Marlin/Marlin_main.cpp 파일 보기

3072
   #if ENABLED(MESH_BED_LEVELING)
3072
   #if ENABLED(MESH_BED_LEVELING)
3073
     if (mbl.has_mesh()) {
3073
     if (mbl.has_mesh()) {
3074
       if (home_all_axis || (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && homeZ)) {
3074
       if (home_all_axis || (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && homeZ)) {
3075
-        current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
3075
+        current_position[Z_AXIS] = MESH_HOME_SEARCH_Z
3076
+          #if Z_HOME_DIR > 0
3077
+            + Z_MAX_POS
3078
+          #endif
3079
+        ;
3076
         SYNC_PLAN_POSITION_KINEMATIC();
3080
         SYNC_PLAN_POSITION_KINEMATIC();
3077
         mbl.set_active(true);
3081
         mbl.set_active(true);
3078
         #if ENABLED(MESH_G28_REST_ORIGIN)
3082
         #if ENABLED(MESH_G28_REST_ORIGIN)
3084
         #else
3088
         #else
3085
           current_position[Z_AXIS] = MESH_HOME_SEARCH_Z -
3089
           current_position[Z_AXIS] = MESH_HOME_SEARCH_Z -
3086
             mbl.get_z(current_position[X_AXIS] - home_offset[X_AXIS],
3090
             mbl.get_z(current_position[X_AXIS] - home_offset[X_AXIS],
3087
-                      current_position[Y_AXIS] - home_offset[Y_AXIS]);
3091
+                      current_position[Y_AXIS] - home_offset[Y_AXIS])
3092
+            #if Z_HOME_DIR > 0
3093
+              + Z_MAX_POS
3094
+            #endif
3095
+          ;
3088
         #endif
3096
         #endif
3089
       }
3097
       }
3090
       else if ((axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) && (homeX || homeY)) {
3098
       else if ((axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) && (homeX || homeY)) {
3223
         // For each G29 S2...
3231
         // For each G29 S2...
3224
         if (probe_point == 0) {
3232
         if (probe_point == 0) {
3225
           // For the intial G29 S2 make Z a positive value (e.g., 4.0)
3233
           // For the intial G29 S2 make Z a positive value (e.g., 4.0)
3226
-          current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
3234
+          current_position[Z_AXIS] = MESH_HOME_SEARCH_Z
3235
+            #if Z_HOME_DIR > 0
3236
+              + Z_MAX_POS
3237
+            #endif
3238
+          ;
3227
           SYNC_PLAN_POSITION_KINEMATIC();
3239
           SYNC_PLAN_POSITION_KINEMATIC();
3228
         }
3240
         }
3229
         else {
3241
         else {

+ 5
- 1
Marlin/ultralcd.cpp 파일 보기

1057
       if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_WAITING));
1057
       if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_WAITING));
1058
       if (LCD_CLICKED) {
1058
       if (LCD_CLICKED) {
1059
         _lcd_level_bed_position = 0;
1059
         _lcd_level_bed_position = 0;
1060
-        current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
1060
+        current_position[Z_AXIS] = MESH_HOME_SEARCH_Z
1061
+          #if Z_HOME_DIR > 0
1062
+            + Z_MAX_POS
1063
+          #endif
1064
+        ;
1061
         planner.set_position_mm(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1065
         planner.set_position_mm(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1062
         lcd_goto_screen(_lcd_level_goto_next_point, true);
1066
         lcd_goto_screen(_lcd_level_goto_next_point, true);
1063
       }
1067
       }

Loading…
취소
저장