Browse Source

Use 0 as the bed position (not Z_MIN_POS)

Scott Lahteine 6 years ago
parent
commit
df2f24617b

+ 1
- 1
Marlin/src/gcode/bedlevel/abl/G29.cpp View File

@@ -473,7 +473,7 @@ void GcodeSuite::G29() {
473 473
         enable_soft_endstops = soft_endstops_enabled;
474 474
       #endif
475 475
       // Move close to the bed before the first point
476
-      do_blocking_move_to_z(Z_MIN_POS);
476
+      do_blocking_move_to_z(0);
477 477
     }
478 478
     else {
479 479
 

+ 3
- 3
Marlin/src/gcode/bedlevel/mbl/G29.cpp View File

@@ -105,7 +105,7 @@ void GcodeSuite::G29() {
105 105
           enable_soft_endstops = soft_endstops_enabled;
106 106
         #endif
107 107
         // Move close to the bed before the first point
108
-        do_blocking_move_to_z(Z_MIN_POS);
108
+        do_blocking_move_to_z(0);
109 109
       }
110 110
       else {
111 111
         // For G29 S2 after adjusting Z.
@@ -127,7 +127,7 @@ void GcodeSuite::G29() {
127 127
       }
128 128
       else {
129 129
         // One last "return to the bed" (as originally coded) at completion
130
-        current_position[Z_AXIS] = Z_MIN_POS + MANUAL_PROBE_HEIGHT;
130
+        current_position[Z_AXIS] = MANUAL_PROBE_HEIGHT;
131 131
         line_to_current_position();
132 132
         stepper.synchronize();
133 133
 
@@ -141,7 +141,7 @@ void GcodeSuite::G29() {
141 141
         set_bed_leveling_enabled(true);
142 142
 
143 143
         #if ENABLED(MESH_G28_REST_ORIGIN)
144
-          current_position[Z_AXIS] = Z_MIN_POS;
144
+          current_position[Z_AXIS] = 0;
145 145
           set_destination_from_current();
146 146
           buffer_line_to_destination(homing_feedrate(Z_AXIS));
147 147
           stepper.synchronize();

+ 2
- 2
Marlin/src/gcode/feature/pause/M701_M702.cpp View File

@@ -85,7 +85,7 @@ void GcodeSuite::M701() {
85 85
 
86 86
   // Restore Z axis
87 87
   if (park_point.z > 0)
88
-    do_blocking_move_to_z(max(current_position[Z_AXIS] - park_point.z, Z_MIN_POS), NOZZLE_PARK_Z_FEEDRATE);
88
+    do_blocking_move_to_z(max(current_position[Z_AXIS] - park_point.z, 0), NOZZLE_PARK_Z_FEEDRATE);
89 89
 
90 90
   #if EXTRUDERS > 1
91 91
     // Restore toolhead if it was changed
@@ -158,7 +158,7 @@ void GcodeSuite::M702() {
158 158
 
159 159
   // Restore Z axis
160 160
   if (park_point.z > 0)
161
-    do_blocking_move_to_z(max(current_position[Z_AXIS] - park_point.z, Z_MIN_POS), NOZZLE_PARK_Z_FEEDRATE);
161
+    do_blocking_move_to_z(max(current_position[Z_AXIS] - park_point.z, 0), NOZZLE_PARK_Z_FEEDRATE);
162 162
 
163 163
   #if EXTRUDERS > 1
164 164
     // Restore toolhead if it was changed

+ 1
- 1
Marlin/src/lcd/ultralcd.cpp View File

@@ -1820,7 +1820,7 @@ void kill_screen(const char* lcd_msg) {
1820 1820
       if (!lcd_wait_for_move) {
1821 1821
         #if MANUAL_PROBE_HEIGHT > 0 && DISABLED(MESH_BED_LEVELING)
1822 1822
           // Display "Done" screen and wait for moves to complete
1823
-          line_to_z(Z_MIN_POS + MANUAL_PROBE_HEIGHT);
1823
+          line_to_z(MANUAL_PROBE_HEIGHT);
1824 1824
           lcd_synchronize(PSTR(MSG_LEVEL_BED_DONE));
1825 1825
         #endif
1826 1826
         lcd_goto_previous_menu_no_defer();

Loading…
Cancel
Save