|
@@ -3072,7 +3072,11 @@ inline void gcode_G28() {
|
3072
|
3072
|
#if ENABLED(MESH_BED_LEVELING)
|
3073
|
3073
|
if (mbl.has_mesh()) {
|
3074
|
3074
|
if (home_all_axis || (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && homeZ)) {
|
3075
|
|
- current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
|
|
3075
|
+ current_position[Z_AXIS] = MESH_HOME_SEARCH_Z
|
|
3076
|
+ #if Z_HOME_DIR > 0
|
|
3077
|
+ + Z_MAX_POS
|
|
3078
|
+ #endif
|
|
3079
|
+ ;
|
3076
|
3080
|
SYNC_PLAN_POSITION_KINEMATIC();
|
3077
|
3081
|
mbl.set_active(true);
|
3078
|
3082
|
#if ENABLED(MESH_G28_REST_ORIGIN)
|
|
@@ -3084,7 +3088,11 @@ inline void gcode_G28() {
|
3084
|
3088
|
#else
|
3085
|
3089
|
current_position[Z_AXIS] = MESH_HOME_SEARCH_Z -
|
3086
|
3090
|
mbl.get_z(current_position[X_AXIS] - home_offset[X_AXIS],
|
3087
|
|
- current_position[Y_AXIS] - home_offset[Y_AXIS]);
|
|
3091
|
+ current_position[Y_AXIS] - home_offset[Y_AXIS])
|
|
3092
|
+ #if Z_HOME_DIR > 0
|
|
3093
|
+ + Z_MAX_POS
|
|
3094
|
+ #endif
|
|
3095
|
+ ;
|
3088
|
3096
|
#endif
|
3089
|
3097
|
}
|
3090
|
3098
|
else if ((axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) && (homeX || homeY)) {
|
|
@@ -3223,7 +3231,11 @@ inline void gcode_G28() {
|
3223
|
3231
|
// For each G29 S2...
|
3224
|
3232
|
if (probe_point == 0) {
|
3225
|
3233
|
// For the intial G29 S2 make Z a positive value (e.g., 4.0)
|
3226
|
|
- current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
|
|
3234
|
+ current_position[Z_AXIS] = MESH_HOME_SEARCH_Z
|
|
3235
|
+ #if Z_HOME_DIR > 0
|
|
3236
|
+ + Z_MAX_POS
|
|
3237
|
+ #endif
|
|
3238
|
+ ;
|
3227
|
3239
|
SYNC_PLAN_POSITION_KINEMATIC();
|
3228
|
3240
|
}
|
3229
|
3241
|
else {
|