Browse Source

fix for #8669 (#8679)

* fix for #8669

* Update G28.cpp
revilor 7 years ago
parent
commit
9e3fbcf35c
1 changed files with 11 additions and 13 deletions
  1. 11
    13
      Marlin/src/gcode/calibrate/G28.cpp

+ 11
- 13
Marlin/src/gcode/calibrate/G28.cpp View File

@@ -205,23 +205,21 @@ void GcodeSuite::G28(const bool always_home_all) {
205 205
         #endif
206 206
       }
207 207
 
208
-    #else
208
+    #endif
209 209
 
210
-      if (home_all || homeX || homeY) {
211
-        // Raise Z before homing any other axes and z is not already high enough (never lower z)
212
-        destination[Z_AXIS] = Z_HOMING_HEIGHT;
213
-        if (destination[Z_AXIS] > current_position[Z_AXIS]) {
210
+    if (home_all || homeX || homeY) {
211
+      // Raise Z before homing any other axes and z is not already high enough (never lower z)
212
+      destination[Z_AXIS] = Z_HOMING_HEIGHT;
213
+      if (destination[Z_AXIS] > current_position[Z_AXIS]) {
214 214
 
215
-          #if ENABLED(DEBUG_LEVELING_FEATURE)
216
-            if (DEBUGGING(LEVELING))
217
-              SERIAL_ECHOLNPAIR("Raise Z (before homing) to ", destination[Z_AXIS]);
218
-          #endif
215
+        #if ENABLED(DEBUG_LEVELING_FEATURE)
216
+          if (DEBUGGING(LEVELING))
217
+            SERIAL_ECHOLNPAIR("Raise Z (before homing) to ", destination[Z_AXIS]);
218
+        #endif
219 219
 
220
-          do_blocking_move_to_z(destination[Z_AXIS]);
221
-        }
220
+        do_blocking_move_to_z(destination[Z_AXIS]);
222 221
       }
223
-
224
-    #endif
222
+    }
225 223
 
226 224
     #if ENABLED(QUICK_HOME)
227 225
 

Loading…
Cancel
Save