|
@@ -3140,19 +3140,13 @@ inline void gcode_G28() {
|
3140
|
3140
|
#if ENABLED(MESH_G28_REST_ORIGIN)
|
3141
|
3141
|
current_position[Z_AXIS] = 0.0;
|
3142
|
3142
|
set_destination_to_current();
|
3143
|
|
- feedrate_mm_s = homing_feedrate_mm_s[Z_AXIS];
|
3144
|
|
- line_to_destination();
|
|
3143
|
+ line_to_destination(homing_feedrate_mm_s[Z_AXIS]);
|
3145
|
3144
|
stepper.synchronize();
|
3146
|
3145
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
3147
|
3146
|
if (DEBUGGING(LEVELING)) DEBUG_POS("MBL Rest Origin", current_position);
|
3148
|
3147
|
#endif
|
3149
|
3148
|
#else
|
3150
|
|
- current_position[Z_AXIS] = MESH_HOME_SEARCH_Z -
|
3151
|
|
- mbl.get_z(RAW_CURRENT_POSITION(X_AXIS), RAW_CURRENT_POSITION(Y_AXIS))
|
3152
|
|
- #if Z_HOME_DIR > 0
|
3153
|
|
- + Z_MAX_POS
|
3154
|
|
- #endif
|
3155
|
|
- ;
|
|
3149
|
+ planner.unapply_leveling(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS]);
|
3156
|
3150
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
3157
|
3151
|
if (DEBUGGING(LEVELING)) DEBUG_POS("MBL adjusted MESH_HOME_SEARCH_Z", current_position);
|
3158
|
3152
|
#endif
|
|
@@ -3162,8 +3156,7 @@ inline void gcode_G28() {
|
3162
|
3156
|
current_position[Z_AXIS] = pre_home_z;
|
3163
|
3157
|
SYNC_PLAN_POSITION_KINEMATIC();
|
3164
|
3158
|
mbl.set_active(true);
|
3165
|
|
- current_position[Z_AXIS] = pre_home_z -
|
3166
|
|
- mbl.get_z(RAW_CURRENT_POSITION(X_AXIS), RAW_CURRENT_POSITION(Y_AXIS));
|
|
3159
|
+ planner.unapply_leveling(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS]);
|
3167
|
3160
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
3168
|
3161
|
if (DEBUGGING(LEVELING)) DEBUG_POS("MBL Home X or Y", current_position);
|
3169
|
3162
|
#endif
|