|
@@ -2381,7 +2381,7 @@ inline void gcode_G28() {
|
2381
|
2381
|
#endif
|
2382
|
2382
|
#endif
|
2383
|
2383
|
|
2384
|
|
- // For manual bed leveling deactivate the matrix temporarily
|
|
2384
|
+ // For mesh bed leveling deactivate the mesh calculations, will be turned on again when homing all axis
|
2385
|
2385
|
#if ENABLED(MESH_BED_LEVELING)
|
2386
|
2386
|
uint8_t mbl_was_active = mbl.active;
|
2387
|
2387
|
mbl.active = 0;
|
|
@@ -2680,18 +2680,17 @@ inline void gcode_G28() {
|
2680
|
2680
|
enable_endstops(false);
|
2681
|
2681
|
#endif
|
2682
|
2682
|
|
2683
|
|
- // For manual leveling move back to 0,0
|
|
2683
|
+ // For mesh leveling move back to Z=0
|
2684
|
2684
|
#if ENABLED(MESH_BED_LEVELING)
|
2685
|
|
- if (mbl_was_active) {
|
2686
|
|
- current_position[X_AXIS] = mbl.get_x(0);
|
2687
|
|
- current_position[Y_AXIS] = mbl.get_y(0);
|
2688
|
|
- set_destination_to_current();
|
2689
|
|
- feedrate = homing_feedrate[X_AXIS];
|
2690
|
|
- line_to_destination();
|
2691
|
|
- st_synchronize();
|
|
2685
|
+ if (mbl_was_active && home_all_axis) {
|
2692
|
2686
|
current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
|
2693
|
2687
|
sync_plan_position();
|
2694
|
2688
|
mbl.active = 1;
|
|
2689
|
+ current_position[Z_AXIS] = 0.0;
|
|
2690
|
+ set_destination_to_current();
|
|
2691
|
+ feedrate = homing_feedrate[Z_AXIS];
|
|
2692
|
+ line_to_destination();
|
|
2693
|
+ st_synchronize();
|
2695
|
2694
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2696
|
2695
|
if (marlin_debug_flags & DEBUG_LEVELING) {
|
2697
|
2696
|
print_xyz("mbl_was_active > current_position", current_position);
|