Browse Source

Use logic in Z_SAFE_HOMING

Use logic in Z_SAFE_HOMING

From
```
if (home_all_axis || homeZ) {
  if (home_all_axis) {
  ...
  home z
  }
  else if (homeZ) { // Don't need to Home Z twice
  home z
  }
}

```
to
```
if (home_all_axis || homeZ) {
  if (home_all_axis) {
  ...
  }
  home z
}
```
pull/1/head
AnHardt 9 years ago
parent
commit
0ea6247fc2
  1. 6
      Marlin/Marlin_main.cpp

6
Marlin/Marlin_main.cpp

@ -3015,13 +3015,8 @@ inline void gcode_G28() {
*/
current_position[X_AXIS] = destination[X_AXIS];
current_position[Y_AXIS] = destination[Y_AXIS];
// Home the Z axis
HOMEAXIS(Z);
}
else if (homeZ) { // Don't need to Home Z twice
// Let's see if X and Y are homed
if (axis_unhomed_error(true, true, false)) return;
@ -3044,7 +3039,6 @@ inline void gcode_G28() {
SERIAL_ECHO_START;
SERIAL_ECHOLNPGM(MSG_ZPROBE_OUT);
}
} // !home_all_axes && homeZ
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) {

Loading…
Cancel
Save