Просмотр исходного кода

Add Z_CLEARANCE_MULTI_PROBE

Co-Authored-By: nightgryphon <ngryph@gmail.com>
Scott Lahteine 6 лет назад
Родитель
Сommit
25e2ca8896

+ 1
- 0
Marlin/Configuration.h Просмотреть файл

@@ -801,6 +801,7 @@
801 801
  */
802 802
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
803 803
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
804
+#define Z_CLEARANCE_MULTI_PROBE     5 // Z Clearance between multiple probes
804 805
 //#define Z_AFTER_PROBING           5 // Z position after probing is done
805 806
 
806 807
 #define Z_PROBE_LOW_POINT          -2 // Farthest distance below the trigger-point to go before stopping

+ 1
- 0
Marlin/src/config/default/Configuration.h Просмотреть файл

@@ -801,6 +801,7 @@
801 801
  */
802 802
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
803 803
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
804
+#define Z_CLEARANCE_MULTI_PROBE     5 // Z Clearance between multiple probes
804 805
 //#define Z_AFTER_PROBING           5 // Z position after probing is done
805 806
 
806 807
 #define Z_PROBE_LOW_POINT          -2 // Farthest distance below the trigger-point to go before stopping

+ 1
- 1
Marlin/src/inc/Conditionals_LCD.h Просмотреть файл

@@ -508,7 +508,7 @@
508 508
  * Set flags for enabled probes
509 509
  */
510 510
 #define HAS_BED_PROBE (ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_PROBE || ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE))
511
-#define PROBE_SELECTED (HAS_BED_PROBE || ENABLED(PROBE_MANUALLY))
511
+#define PROBE_SELECTED (HAS_BED_PROBE || ENABLED(PROBE_MANUALLY) || ENABLED(MESH_BED_LEVELING))
512 512
 
513 513
 #if !HAS_BED_PROBE
514 514
   // Clear probe pin settings when no probe is selected

+ 13
- 7
Marlin/src/inc/Conditionals_post.h Просмотреть файл

@@ -1308,13 +1308,19 @@
1308 1308
     #define Z_HOMING_HEIGHT Z_CLEARANCE_BETWEEN_PROBES
1309 1309
   #endif
1310 1310
 #endif
1311
-#ifndef Z_CLEARANCE_BETWEEN_PROBES
1312
-  #define Z_CLEARANCE_BETWEEN_PROBES Z_HOMING_HEIGHT
1313
-#endif
1314
-#if Z_CLEARANCE_BETWEEN_PROBES > Z_HOMING_HEIGHT
1315
-  #define MANUAL_PROBE_HEIGHT Z_CLEARANCE_BETWEEN_PROBES
1316
-#else
1317
-  #define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT
1311
+
1312
+#if PROBE_SELECTED
1313
+  #ifndef Z_CLEARANCE_BETWEEN_PROBES
1314
+    #define Z_CLEARANCE_BETWEEN_PROBES Z_HOMING_HEIGHT
1315
+  #endif
1316
+  #if Z_CLEARANCE_BETWEEN_PROBES > Z_HOMING_HEIGHT
1317
+    #define MANUAL_PROBE_HEIGHT Z_CLEARANCE_BETWEEN_PROBES
1318
+  #else
1319
+    #define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT
1320
+  #endif
1321
+  #ifndef Z_CLEARANCE_MULTI_PROBE
1322
+    #define Z_CLEARANCE_MULTI_PROBE Z_CLEARANCE_BETWEEN_PROBES
1323
+  #endif
1318 1324
 #endif
1319 1325
 
1320 1326
 #ifndef __SAM3X8E__ //todo: hal: broken hal encapsulation

+ 2
- 2
Marlin/src/module/probe.cpp Просмотреть файл

@@ -584,7 +584,7 @@ static float run_z_probe() {
584 584
     #endif
585 585
 
586 586
     // move up to make clearance for the probe
587
-    do_blocking_move_to_z(current_position[Z_AXIS] + Z_CLEARANCE_BETWEEN_PROBES, MMM_TO_MMS(Z_PROBE_SPEED_FAST));
587
+    do_blocking_move_to_z(current_position[Z_AXIS] + Z_CLEARANCE_MULTI_PROBE, MMM_TO_MMS(Z_PROBE_SPEED_FAST));
588 588
 
589 589
   #else
590 590
 
@@ -618,7 +618,7 @@ static float run_z_probe() {
618 618
 
619 619
   #if MULTIPLE_PROBING > 2
620 620
       probes_total += current_position[Z_AXIS];
621
-      if (p > 1) do_blocking_move_to_z(current_position[Z_AXIS] + Z_CLEARANCE_BETWEEN_PROBES, MMM_TO_MMS(Z_PROBE_SPEED_FAST));
621
+      if (p > 1) do_blocking_move_to_z(current_position[Z_AXIS] + Z_CLEARANCE_MULTI_PROBE, MMM_TO_MMS(Z_PROBE_SPEED_FAST));
622 622
     }
623 623
   #endif
624 624
 

Загрузка…
Отмена
Сохранить