|
@@ -343,6 +343,7 @@ static uint8_t target_extruder;
|
343
|
343
|
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
|
344
|
344
|
int xy_travel_speed = XY_TRAVEL_SPEED;
|
345
|
345
|
float zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER;
|
|
346
|
+ bool bed_leveling_in_progress = false;
|
346
|
347
|
#endif
|
347
|
348
|
|
348
|
349
|
#if ENABLED(Z_DUAL_ENDSTOPS) && DISABLED(DELTA)
|
|
@@ -1632,7 +1633,12 @@ static void setup_for_endstop_move() {
|
1632
|
1633
|
destination[X_AXIS] = x;
|
1633
|
1634
|
destination[Y_AXIS] = y;
|
1634
|
1635
|
destination[Z_AXIS] = z;
|
1635
|
|
- prepare_move_raw(); // this will also set_current_to_destination
|
|
1636
|
+
|
|
1637
|
+ if (x == current_position[X_AXIS] && y == current_position[Y_AXIS])
|
|
1638
|
+ prepare_move_raw(); // this will also set_current_to_destination
|
|
1639
|
+ else
|
|
1640
|
+ prepare_move(); // this will also set_current_to_destination
|
|
1641
|
+
|
1636
|
1642
|
stepper.synchronize();
|
1637
|
1643
|
|
1638
|
1644
|
#else
|
|
@@ -3238,6 +3244,8 @@ inline void gcode_G28() {
|
3238
|
3244
|
|
3239
|
3245
|
feedrate = homing_feedrate[Z_AXIS];
|
3240
|
3246
|
|
|
3247
|
+ bed_leveling_in_progress = true;
|
|
3248
|
+
|
3241
|
3249
|
#if ENABLED(AUTO_BED_LEVELING_GRID)
|
3242
|
3250
|
|
3243
|
3251
|
// probe at the points of a lattice grid
|
|
@@ -3585,15 +3593,17 @@ inline void gcode_G28() {
|
3585
|
3593
|
stepper.synchronize();
|
3586
|
3594
|
#endif
|
3587
|
3595
|
|
3588
|
|
- KEEPALIVE_STATE(IN_HANDLER);
|
3589
|
|
-
|
3590
|
3596
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
3591
|
3597
|
if (DEBUGGING(LEVELING)) {
|
3592
|
3598
|
SERIAL_ECHOLNPGM("<<< gcode_G29");
|
3593
|
3599
|
}
|
3594
|
3600
|
#endif
|
3595
|
3601
|
|
|
3602
|
+ bed_leveling_in_progress = false;
|
|
3603
|
+
|
3596
|
3604
|
report_current_position();
|
|
3605
|
+
|
|
3606
|
+ KEEPALIVE_STATE(IN_HANDLER);
|
3597
|
3607
|
}
|
3598
|
3608
|
|
3599
|
3609
|
#if DISABLED(Z_PROBE_SLED) // could be avoided
|
|
@@ -7305,7 +7315,7 @@ void mesh_buffer_line(float x, float y, float z, const float e, float feed_rate,
|
7305
|
7315
|
calculate_delta(target);
|
7306
|
7316
|
|
7307
|
7317
|
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
|
7308
|
|
- adjust_delta(target);
|
|
7318
|
+ if (!bed_leveling_in_progress) adjust_delta(target);
|
7309
|
7319
|
#endif
|
7310
|
7320
|
|
7311
|
7321
|
//DEBUG_POS("prepare_move_delta", target);
|