|
@@ -1943,12 +1943,16 @@ inline void gcode_G28() {
|
1943
|
1943
|
if (home_all_axis || homeY) HOMEAXIS(Y);
|
1944
|
1944
|
|
1945
|
1945
|
// Set the X position, if included
|
1946
|
|
- if (code_seen(axis_codes[X_AXIS]) && code_has_value())
|
1947
|
|
- current_position[X_AXIS] = code_value();
|
|
1946
|
+ if (code_seen(axis_codes[X_AXIS]) && code_has_value()) {
|
|
1947
|
+ if (code_value_long() != 0) // filter 0
|
|
1948
|
+ current_position[X_AXIS] = code_value();
|
|
1949
|
+ }
|
1948
|
1950
|
|
1949
|
1951
|
// Set the Y position, if included
|
1950
|
|
- if (code_seen(axis_codes[Y_AXIS]) && code_has_value())
|
1951
|
|
- current_position[Y_AXIS] = code_value();
|
|
1952
|
+ if (code_seen(axis_codes[Y_AXIS]) && code_has_value()) {
|
|
1953
|
+ if (code_value_long() != 0) // filter 0
|
|
1954
|
+ current_position[Y_AXIS] = code_value();
|
|
1955
|
+ }
|
1952
|
1956
|
|
1953
|
1957
|
// Home Z last if homing towards the bed
|
1954
|
1958
|
#if Z_HOME_DIR < 0
|
|
@@ -2034,8 +2038,10 @@ inline void gcode_G28() {
|
2034
|
2038
|
#endif // Z_HOME_DIR < 0
|
2035
|
2039
|
|
2036
|
2040
|
// Set the Z position, if included
|
2037
|
|
- if (code_seen(axis_codes[Z_AXIS]) && code_has_value())
|
2038
|
|
- current_position[Z_AXIS] = code_value();
|
|
2041
|
+ if (code_seen(axis_codes[Z_AXIS]) && code_has_value()) {
|
|
2042
|
+ if (code_value_long() != 0) // filter 0
|
|
2043
|
+ current_position[Z_AXIS] = code_value();
|
|
2044
|
+ }
|
2039
|
2045
|
|
2040
|
2046
|
#if defined(ENABLE_AUTO_BED_LEVELING) && (Z_HOME_DIR < 0)
|
2041
|
2047
|
if (home_all_axis || homeZ) current_position[Z_AXIS] += zprobe_zoffset; // Add Z_Probe offset (the distance is negative)
|