Kaynağa Gözat

Manual Bed Leveling: Goto previous Z height at each probe point

Wilfried Chauveau 8 yıl önce
ebeveyn
işleme
894608f8a3
2 değiştirilmiş dosya ile 5 ekleme ve 4 silme
  1. 3
    3
      Marlin/Marlin_main.cpp
  2. 2
    1
      Marlin/ultralcd.cpp

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

@@ -3998,10 +3998,10 @@ void home_all_axes() { gcode_G28(true); }
3998 3998
 
3999 3999
   inline void _manual_goto_xy(const float &x, const float &y) {
4000 4000
     const float old_feedrate_mm_s = feedrate_mm_s;
4001
-
4002 4001
     #if MANUAL_PROBE_HEIGHT > 0
4002
+      const float prev_z = current_position[Z_AXIS];
4003 4003
       feedrate_mm_s = homing_feedrate(Z_AXIS);
4004
-      current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT;
4004
+      current_position[Z_AXIS] = LOGICAL_Z_POSITION(MANUAL_PROBE_HEIGHT);
4005 4005
       line_to_current_position();
4006 4006
     #endif
4007 4007
 
@@ -4012,7 +4012,7 @@ void home_all_axes() { gcode_G28(true); }
4012 4012
 
4013 4013
     #if MANUAL_PROBE_HEIGHT > 0
4014 4014
       feedrate_mm_s = homing_feedrate(Z_AXIS);
4015
-      current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS); // just slightly over the bed
4015
+      current_position[Z_AXIS] = prev_z; // move back to the previous Z.
4016 4016
       line_to_current_position();
4017 4017
     #endif
4018 4018
 

+ 2
- 1
Marlin/ultralcd.cpp Dosyayı Görüntüle

@@ -1586,13 +1586,14 @@ void kill_screen(const char* lcd_msg) {
1586 1586
       // Utility to go to the next mesh point
1587 1587
       inline void _manual_probe_goto_xy(float x, float y) {
1588 1588
         #if MANUAL_PROBE_HEIGHT > 0
1589
+          const float prev_z = current_position[Z_AXIS];
1589 1590
           line_to_z(LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT);
1590 1591
         #endif
1591 1592
         current_position[X_AXIS] = LOGICAL_X_POSITION(x);
1592 1593
         current_position[Y_AXIS] = LOGICAL_Y_POSITION(y);
1593 1594
         planner.buffer_line_kinematic(current_position, MMM_TO_MMS(XY_PROBE_SPEED), active_extruder);
1594 1595
         #if MANUAL_PROBE_HEIGHT > 0
1595
-          line_to_z(LOGICAL_Z_POSITION(Z_MIN_POS));
1596
+          line_to_z(prev_z);
1596 1597
         #endif
1597 1598
         lcd_synchronize();
1598 1599
       }

Loading…
İptal
Kaydet