Browse Source

Merge pull request #1945 from Wurstnase/max_endstopp

Max endstopp
pull/1/head
Scott Lahteine 9 years ago
parent
commit
3a74bb5039
  1. 18
      Marlin/Marlin_main.cpp

18
Marlin/Marlin_main.cpp

@ -1943,12 +1943,16 @@ inline void gcode_G28() {
if (home_all_axis || homeY) HOMEAXIS(Y);
// Set the X position, if included
if (code_seen(axis_codes[X_AXIS]) && code_has_value())
current_position[X_AXIS] = code_value();
if (code_seen(axis_codes[X_AXIS]) && code_has_value()) {
if (code_value_long() != 0) // filter 0
current_position[X_AXIS] = code_value();
}
// Set the Y position, if included
if (code_seen(axis_codes[Y_AXIS]) && code_has_value())
current_position[Y_AXIS] = code_value();
if (code_seen(axis_codes[Y_AXIS]) && code_has_value()) {
if (code_value_long() != 0) // filter 0
current_position[Y_AXIS] = code_value();
}
// Home Z last if homing towards the bed
#if Z_HOME_DIR < 0
@ -2034,8 +2038,10 @@ inline void gcode_G28() {
#endif // Z_HOME_DIR < 0
// Set the Z position, if included
if (code_seen(axis_codes[Z_AXIS]) && code_has_value())
current_position[Z_AXIS] = code_value();
if (code_seen(axis_codes[Z_AXIS]) && code_has_value()) {
if (code_value_long() != 0) // filter 0
current_position[Z_AXIS] = code_value();
}
#if defined(ENABLE_AUTO_BED_LEVELING) && (Z_HOME_DIR < 0)
if (home_all_axis || homeZ) current_position[Z_AXIS] += zprobe_zoffset; // Add Z_Probe offset (the distance is negative)

Loading…
Cancel
Save