|
@@ -1790,12 +1790,6 @@ inline void gcode_G4() {
|
1790
|
1790
|
* Y Home to the Y endstop
|
1791
|
1791
|
* Z Home to the Z endstop
|
1792
|
1792
|
*
|
1793
|
|
- * If numbers are included with XYZ set the position as with G92
|
1794
|
|
- * Currently adds the home_offset, which may be wrong and removed soon.
|
1795
|
|
- *
|
1796
|
|
- * Xn Home X, setting X to n + home_offset[X_AXIS]
|
1797
|
|
- * Yn Home Y, setting Y to n + home_offset[Y_AXIS]
|
1798
|
|
- * Zn Home Z, setting Z to n + home_offset[Z_AXIS]
|
1799
|
1793
|
*/
|
1800
|
1794
|
inline void gcode_G28() {
|
1801
|
1795
|
|
|
@@ -1855,7 +1849,7 @@ inline void gcode_G28() {
|
1855
|
1849
|
homeY = code_seen(axis_codes[Y_AXIS]),
|
1856
|
1850
|
homeZ = code_seen(axis_codes[Z_AXIS]);
|
1857
|
1851
|
|
1858
|
|
- home_all_axis = !(homeX || homeY || homeZ) || (homeX && homeY && homeZ);
|
|
1852
|
+ home_all_axis = (!homeX && !homeY && !homeZ) || (homeX && homeY && homeZ);
|
1859
|
1853
|
|
1860
|
1854
|
if (home_all_axis || homeZ) {
|
1861
|
1855
|
|
|
@@ -1942,18 +1936,6 @@ inline void gcode_G28() {
|
1942
|
1936
|
// Home Y
|
1943
|
1937
|
if (home_all_axis || homeY) HOMEAXIS(Y);
|
1944
|
1938
|
|
1945
|
|
- // Set the X position, if included
|
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
|
|
- }
|
1950
|
|
-
|
1951
|
|
- // Set the Y position, if included
|
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
|
|
- }
|
1956
|
|
-
|
1957
|
1939
|
// Home Z last if homing towards the bed
|
1958
|
1940
|
#if Z_HOME_DIR < 0
|
1959
|
1941
|
|
|
@@ -2037,12 +2019,6 @@ inline void gcode_G28() {
|
2037
|
2019
|
|
2038
|
2020
|
#endif // Z_HOME_DIR < 0
|
2039
|
2021
|
|
2040
|
|
- // Set the Z position, if included
|
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
|
|
- }
|
2045
|
|
-
|
2046
|
2022
|
#if defined(ENABLE_AUTO_BED_LEVELING) && (Z_HOME_DIR < 0)
|
2047
|
2023
|
if (home_all_axis || homeZ) current_position[Z_AXIS] += zprobe_zoffset; // Add Z_Probe offset (the distance is negative)
|
2048
|
2024
|
#endif
|