|
@@ -3390,8 +3390,10 @@ inline void gcode_G28() {
|
3390
|
3390
|
|
3391
|
3391
|
bool dryrun = code_seen('D');
|
3392
|
3392
|
|
3393
|
|
- #if DISABLED(Z_PROBE_SLED) && DISABLED(Z_PROBE_ALLEN_KEY)
|
3394
|
|
- bool deploy_probe_for_each_reading = code_seen('E');
|
|
3393
|
+ #if ENABLED(Z_PROBE_SLED) || ENABLED(Z_PROBE_ALLEN_KEY)
|
|
3394
|
+ const bool stow_probe_after_each = false;
|
|
3395
|
+ #else
|
|
3396
|
+ bool stow_probe_after_each = code_seen('E');
|
3395
|
3397
|
#endif
|
3396
|
3398
|
|
3397
|
3399
|
#if ENABLED(AUTO_BED_LEVELING_GRID)
|
|
@@ -3548,42 +3550,13 @@ inline void gcode_G28() {
|
3548
|
3550
|
for (int xCount = xStart; xCount != xStop; xCount += xInc) {
|
3549
|
3551
|
double xProbe = left_probe_bed_position + xGridSpacing * xCount;
|
3550
|
3552
|
|
3551
|
|
- // raise extruder
|
3552
|
|
- float measured_z,
|
3553
|
|
- z_raise = probePointCounter ? Z_RAISE_BETWEEN_PROBINGS : Z_RAISE_BEFORE_PROBING;
|
3554
|
|
-
|
3555
|
|
- #if ENABLED(DEBUG_LEVELING_FEATURE)
|
3556
|
|
- if (DEBUGGING(LEVELING)) {
|
3557
|
|
- SERIAL_ECHOPGM("z_raise = (");
|
3558
|
|
- if (probePointCounter)
|
3559
|
|
- SERIAL_ECHOPGM("between) ");
|
3560
|
|
- else
|
3561
|
|
- SERIAL_ECHOPGM("before) ");
|
3562
|
|
- SERIAL_ECHOLN(z_raise);
|
3563
|
|
- }
|
3564
|
|
- #endif
|
3565
|
|
-
|
3566
|
3553
|
#if ENABLED(DELTA)
|
3567
|
3554
|
// Avoid probing the corners (outside the round or hexagon print surface) on a delta printer.
|
3568
|
3555
|
float distance_from_center = sqrt(xProbe * xProbe + yProbe * yProbe);
|
3569
|
3556
|
if (distance_from_center > DELTA_PROBEABLE_RADIUS) continue;
|
3570
|
3557
|
#endif //DELTA
|
3571
|
3558
|
|
3572
|
|
- #if ENABLED(Z_PROBE_SLED) || ENABLED(Z_PROBE_ALLEN_KEY)
|
3573
|
|
- const ProbeAction act = ProbeStay;
|
3574
|
|
- #else
|
3575
|
|
- ProbeAction act;
|
3576
|
|
- if (deploy_probe_for_each_reading) // G29 E - Stow between probes
|
3577
|
|
- act = ProbeDeployAndStow;
|
3578
|
|
- else if (yCount == 0 && xCount == xStart)
|
3579
|
|
- act = ProbeDeploy;
|
3580
|
|
- else if (yCount == auto_bed_leveling_grid_points - 1 && xCount == xStop - xInc)
|
3581
|
|
- act = ProbeStow;
|
3582
|
|
- else
|
3583
|
|
- act = ProbeStay;
|
3584
|
|
- #endif
|
3585
|
|
-
|
3586
|
|
- measured_z = probe_pt(xProbe, yProbe, z_raise, act, verbose_level);
|
|
3559
|
+ float measured_z = probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
|
3587
|
3560
|
|
3588
|
3561
|
#if DISABLED(DELTA)
|
3589
|
3562
|
mean += measured_z;
|