Browse Source

Merge pull request #4231 from thinkyhead/rc_fix_homing_raise

Fix comment on Z raise for homing, save a few bytes
Scott Lahteine 8 years ago
parent
commit
e76aa9d79a
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      Marlin/Marlin_main.cpp

+ 5
- 5
Marlin/Marlin_main.cpp View File

@@ -2916,11 +2916,11 @@ inline void gcode_G28() {
2916 2916
 
2917 2917
     #elif defined(MIN_Z_HEIGHT_FOR_HOMING) && MIN_Z_HEIGHT_FOR_HOMING > 0
2918 2918
 
2919
-      // Raise Z before homing any other axes and z is not already high enough (never lower z)
2920
-      float z_dest = (current_position[Z_AXIS] += MIN_Z_HEIGHT_FOR_HOMING);
2919
+      // Raise Z before homing, if specified
2920
+      destination[Z_AXIS] = (current_position[Z_AXIS] += MIN_Z_HEIGHT_FOR_HOMING);
2921 2921
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2922 2922
         if (DEBUGGING(LEVELING)) {
2923
-          SERIAL_ECHOPAIR("Raise Z (before homing) to ", z_dest);
2923
+          SERIAL_ECHOPAIR("Raise Z (before homing) to ", destination[Z_AXIS]);
2924 2924
           SERIAL_EOL;
2925 2925
         }
2926 2926
       #endif
@@ -2928,9 +2928,9 @@ inline void gcode_G28() {
2928 2928
       feedrate = homing_feedrate[Z_AXIS];
2929 2929
 
2930 2930
       #if HAS_BED_PROBE
2931
-        do_blocking_move_to_z(z_dest);
2931
+        do_blocking_move_to_z(destination[Z_AXIS]);
2932 2932
       #else
2933
-        line_to_z(z_dest);
2933
+        line_to_z(destination[Z_AXIS]);
2934 2934
         stepper.synchronize();
2935 2935
       #endif
2936 2936
 

Loading…
Cancel
Save