浏览代码

Simplified probe_pt function (G28 grid)

Scott Lahteine 9 年前
父节点
当前提交
f8530c5d1f
共有 1 个文件被更改,包括 5 次插入32 次删除
  1. 5
    32
      Marlin/Marlin_main.cpp

+ 5
- 32
Marlin/Marlin_main.cpp 查看文件

3390
 
3390
 
3391
     bool dryrun = code_seen('D');
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
     #endif
3397
     #endif
3396
 
3398
 
3397
     #if ENABLED(AUTO_BED_LEVELING_GRID)
3399
     #if ENABLED(AUTO_BED_LEVELING_GRID)
3548
         for (int xCount = xStart; xCount != xStop; xCount += xInc) {
3550
         for (int xCount = xStart; xCount != xStop; xCount += xInc) {
3549
           double xProbe = left_probe_bed_position + xGridSpacing * xCount;
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
           #if ENABLED(DELTA)
3553
           #if ENABLED(DELTA)
3567
             // Avoid probing the corners (outside the round or hexagon print surface) on a delta printer.
3554
             // Avoid probing the corners (outside the round or hexagon print surface) on a delta printer.
3568
             float distance_from_center = sqrt(xProbe * xProbe + yProbe * yProbe);
3555
             float distance_from_center = sqrt(xProbe * xProbe + yProbe * yProbe);
3569
             if (distance_from_center > DELTA_PROBEABLE_RADIUS) continue;
3556
             if (distance_from_center > DELTA_PROBEABLE_RADIUS) continue;
3570
           #endif //DELTA
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
           #if DISABLED(DELTA)
3561
           #if DISABLED(DELTA)
3589
             mean += measured_z;
3562
             mean += measured_z;

正在加载...
取消
保存