Kaynağa Gözat

Add option to configure G28 all axis resting position for MBL

Edward Patel 9 yıl önce
ebeveyn
işleme
c7d90dc5ec
2 değiştirilmiş dosya ile 10 ekleme ve 6 silme
  1. 2
    0
      Marlin/Configuration.h
  2. 8
    6
      Marlin/Marlin_main.cpp

+ 2
- 0
Marlin/Configuration.h Dosyayı Görüntüle

525
   #define MESH_NUM_Y_POINTS 3
525
   #define MESH_NUM_Y_POINTS 3
526
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
526
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
527
 
527
 
528
+  //#define MESH_G28_REST_ORIGIN // Enable to make 'G28' all axis to rest at origin [0,0,0]
529
+
528
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
530
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
529
 
531
 
530
   #if ENABLED(MANUAL_BED_LEVELING)
532
   #if ENABLED(MANUAL_BED_LEVELING)

+ 8
- 6
Marlin/Marlin_main.cpp Dosyayı Görüntüle

2918
     #endif
2918
     #endif
2919
   #endif
2919
   #endif
2920
 
2920
 
2921
-  // For mesh leveling move back to Z=0
2921
+  // Enable mesh leveling again
2922
   #if ENABLED(MESH_BED_LEVELING)
2922
   #if ENABLED(MESH_BED_LEVELING)
2923
     if (mbl_was_active && home_all_axis) {
2923
     if (mbl_was_active && home_all_axis) {
2924
       current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
2924
       current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
2925
       sync_plan_position();
2925
       sync_plan_position();
2926
       mbl.active = 1;
2926
       mbl.active = 1;
2927
-      current_position[Z_AXIS] = 0.0;
2928
-      set_destination_to_current();
2929
-      feedrate = homing_feedrate[Z_AXIS];
2930
-      line_to_destination();
2931
-      stepper.synchronize();
2927
+      #if ENABLED(MESH_G28_REST_ORIGIN)
2928
+        current_position[Z_AXIS] = 0.0;
2929
+        set_destination_to_current();
2930
+        feedrate = homing_feedrate[Z_AXIS];
2931
+        line_to_destination();
2932
+        stepper.synchronize();
2933
+      #endif
2932
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2934
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2933
         if (DEBUGGING(LEVELING)) DEBUG_POS("mbl_was_active", current_position);
2935
         if (DEBUGGING(LEVELING)) DEBUG_POS("mbl_was_active", current_position);
2934
       #endif
2936
       #endif

Loading…
İptal
Kaydet