Bläddra i källkod

[2.0.x] Add Z_AFTER_PROBING option (#10058)

Some "fix-mounted" probes need manual stowing. And after probing some may prefer to raise or lower the nozzle. This restores an old option but tailors it to allow raise or lower as preferred.
Scott Lahteine 6 år sedan
förälder
incheckning
28f1276286
Inget konto är kopplat till bidragsgivarens mejladress
70 ändrade filer med 119 tillägg och 10 borttagningar
  1. 1
    0
      Marlin/Configuration.h
  2. 1
    0
      Marlin/src/config/default/Configuration.h
  3. 1
    0
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
  4. 1
    0
      Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
  5. 3
    1
      Marlin/src/config/examples/Anet/A6/Configuration.h
  6. 1
    0
      Marlin/src/config/examples/Anet/A8/Configuration.h
  7. 1
    0
      Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
  8. 1
    0
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h
  9. 1
    0
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h
  10. 1
    0
      Marlin/src/config/examples/BQ/Hephestos/Configuration.h
  11. 1
    0
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
  12. 1
    0
      Marlin/src/config/examples/BQ/WITBOX/Configuration.h
  13. 1
    0
      Marlin/src/config/examples/Cartesio/Configuration.h
  14. 1
    0
      Marlin/src/config/examples/Creality/CR-10/Configuration.h
  15. 1
    0
      Marlin/src/config/examples/Creality/CR-10S/Configuration.h
  16. 1
    0
      Marlin/src/config/examples/Creality/CR-10mini/Configuration.h
  17. 1
    0
      Marlin/src/config/examples/Creality/Ender-2/Configuration.h
  18. 1
    0
      Marlin/src/config/examples/Creality/Ender-4/Configuration.h
  19. 1
    0
      Marlin/src/config/examples/Felix/Configuration.h
  20. 1
    0
      Marlin/src/config/examples/Felix/DUAL/Configuration.h
  21. 1
    0
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
  22. 1
    0
      Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
  23. 1
    0
      Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
  24. 1
    0
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h
  25. 1
    0
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h
  26. 1
    0
      Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
  27. 1
    0
      Marlin/src/config/examples/JGAurora/A5/Configuration.h
  28. 1
    0
      Marlin/src/config/examples/MakerParts/Configuration.h
  29. 3
    2
      Marlin/src/config/examples/Malyan/M150/Configuration.h
  30. 1
    0
      Marlin/src/config/examples/Malyan/M200/Configuration.h
  31. 1
    0
      Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
  32. 1
    0
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
  33. 1
    0
      Marlin/src/config/examples/Mks/Sbase/Configuration.h
  34. 1
    0
      Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
  35. 1
    0
      Marlin/src/config/examples/RigidBot/Configuration.h
  36. 1
    0
      Marlin/src/config/examples/SCARA/Configuration.h
  37. 1
    0
      Marlin/src/config/examples/STM32F10/Configuration.h
  38. 1
    0
      Marlin/src/config/examples/Sanguinololu/Configuration.h
  39. 1
    0
      Marlin/src/config/examples/TheBorg/Configuration.h
  40. 1
    0
      Marlin/src/config/examples/TinyBoy2/Configuration.h
  41. 1
    0
      Marlin/src/config/examples/Tronxy/X1/Configuration.h
  42. 1
    0
      Marlin/src/config/examples/Tronxy/X5S/Configuration.h
  43. 1
    0
      Marlin/src/config/examples/Tronxy/XY100/Configuration.h
  44. 1
    0
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h
  45. 1
    0
      Marlin/src/config/examples/Velleman/K8200/Configuration.h
  46. 1
    0
      Marlin/src/config/examples/Velleman/K8400/Configuration.h
  47. 1
    0
      Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h
  48. 1
    0
      Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h
  49. 1
    0
      Marlin/src/config/examples/adafruit/ST7565/Configuration.h
  50. 1
    0
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h
  51. 1
    0
      Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h
  52. 1
    0
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h
  53. 1
    0
      Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h
  54. 1
    0
      Marlin/src/config/examples/delta/generic/Configuration.h
  55. 1
    0
      Marlin/src/config/examples/delta/kossel_mini/Configuration.h
  56. 1
    0
      Marlin/src/config/examples/delta/kossel_pro/Configuration.h
  57. 1
    0
      Marlin/src/config/examples/delta/kossel_xl/Configuration.h
  58. 1
    0
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h
  59. 1
    0
      Marlin/src/config/examples/makibox/Configuration.h
  60. 1
    0
      Marlin/src/config/examples/stm32f103ret6/Configuration.h
  61. 1
    0
      Marlin/src/config/examples/tvrrug/Round2/Configuration.h
  62. 1
    0
      Marlin/src/config/examples/wt150/Configuration.h
  63. 7
    0
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
  64. 7
    3
      Marlin/src/gcode/bedlevel/abl/G29.cpp
  65. 7
    0
      Marlin/src/gcode/calibrate/G28.cpp
  66. 4
    1
      Marlin/src/gcode/probe/G30.cpp
  67. 10
    2
      Marlin/src/gcode/probe/M401_M402.cpp
  68. 3
    1
      Marlin/src/inc/SanityCheck.h
  69. 10
    0
      Marlin/src/module/probe.cpp
  70. 5
    0
      Marlin/src/module/probe.h

+ 1
- 0
Marlin/Configuration.h Visa fil

@@ -753,6 +753,7 @@
753 753
  */
754 754
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
755 755
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
756
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
756 757
 
757 758
 // For M851 give a range for adjusting the Z probe offset
758 759
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/default/Configuration.h Visa fil

@@ -753,6 +753,7 @@
753 753
  */
754 754
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
755 755
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
756
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
756 757
 
757 758
 // For M851 give a range for adjusting the Z probe offset
758 759
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h Visa fil

@@ -773,6 +773,7 @@
773 773
  */
774 774
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
775 775
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
776
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
776 777
 
777 778
 // For M851 give a range for adjusting the Z probe offset
778 779
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/AliExpress/CL-260/Configuration.h Visa fil

@@ -753,6 +753,7 @@
753 753
  */
754 754
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
755 755
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
756
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
756 757
 
757 758
 // For M851 give a range for adjusting the Z probe offset
758 759
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 3
- 1
Marlin/src/config/examples/Anet/A6/Configuration.h Visa fil

@@ -823,8 +823,10 @@
823 823
  */
824 824
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
825 825
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
826
-//#define Z_CLEARANCE_DEPLOY_PROBE   5 // Z Clearance for Deploy/Stow
826
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
827
+//#define Z_CLEARANCE_DEPLOY_PROBE    5 // Z Clearance for Deploy/Stow
827 828
 //#define Z_CLEARANCE_BETWEEN_PROBES  3 // Z Clearance between probe points
829
+//#define Z_AFTER_PROBING             3 // Z position after probing is done
828 830
 
829 831
 // For M851 give a range for adjusting the Z probe offset
830 832
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Anet/A8/Configuration.h Visa fil

@@ -760,6 +760,7 @@
760 760
  */
761 761
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
762 762
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
763
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
763 764
 
764 765
 // For M851 give a range for adjusting the Z probe offset
765 766
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Azteeg/X5GT/Configuration.h Visa fil

@@ -753,6 +753,7 @@
753 753
  */
754 754
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
755 755
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
756
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
756 757
 
757 758
 // For M851 give a range for adjusting the Z probe offset
758 759
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h Visa fil

@@ -753,6 +753,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
753 753
  */
754 754
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
755 755
 #define Z_CLEARANCE_BETWEEN_PROBES 10 // Z Clearance between probe points
756
+//#define Z_AFTER_PROBING          10 // Z position after probing is done
756 757
 
757 758
 // For M851 give a range for adjusting the Z probe offset
758 759
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h Visa fil

@@ -753,6 +753,7 @@
753 753
  */
754 754
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
755 755
 #define Z_CLEARANCE_BETWEEN_PROBES 10 // Z Clearance between probe points
756
+//#define Z_AFTER_PROBING          10 // Z position after probing is done
756 757
 
757 758
 // For M851 give a range for adjusting the Z probe offset
758 759
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/BQ/Hephestos/Configuration.h Visa fil

@@ -741,6 +741,7 @@
741 741
  */
742 742
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
743 743
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
744
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
744 745
 
745 746
 // For M851 give a range for adjusting the Z probe offset
746 747
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h Visa fil

@@ -754,6 +754,7 @@
754 754
  */
755 755
 #define Z_CLEARANCE_DEPLOY_PROBE   0 // Z Clearance for Deploy/Stow
756 756
 #define Z_CLEARANCE_BETWEEN_PROBES 2 // Z Clearance between probe points
757
+//#define Z_AFTER_PROBING          2 // Z position after probing is done
757 758
 
758 759
 // For M851 give a range for adjusting the Z probe offset
759 760
 #define Z_PROBE_OFFSET_RANGE_MIN -2

+ 1
- 0
Marlin/src/config/examples/BQ/WITBOX/Configuration.h Visa fil

@@ -741,6 +741,7 @@
741 741
  */
742 742
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
743 743
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
744
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
744 745
 
745 746
 // For M851 give a range for adjusting the Z probe offset
746 747
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Cartesio/Configuration.h Visa fil

@@ -752,6 +752,7 @@
752 752
  */
753 753
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
754 754
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
755
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
755 756
 
756 757
 // For M851 give a range for adjusting the Z probe offset
757 758
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Creality/CR-10/Configuration.h Visa fil

@@ -763,6 +763,7 @@
763 763
  */
764 764
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
765 765
 #define Z_CLEARANCE_BETWEEN_PROBES 10 // Z Clearance between probe points
766
+//#define Z_AFTER_PROBING          10 // Z position after probing is done
766 767
 
767 768
 // For M851 give a range for adjusting the Z probe offset
768 769
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Creality/CR-10S/Configuration.h Visa fil

@@ -753,6 +753,7 @@
753 753
  */
754 754
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
755 755
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
756
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
756 757
 
757 758
 // For M851 give a range for adjusting the Z probe offset
758 759
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Creality/CR-10mini/Configuration.h Visa fil

@@ -772,6 +772,7 @@
772 772
  */
773 773
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
774 774
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
775
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
775 776
 
776 777
 // For M851 give a range for adjusting the Z probe offset
777 778
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Creality/Ender-2/Configuration.h Visa fil

@@ -757,6 +757,7 @@
757 757
  */
758 758
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
759 759
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
760
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
760 761
 
761 762
 // For M851 give a range for adjusting the Z probe offset
762 763
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Creality/Ender-4/Configuration.h Visa fil

@@ -763,6 +763,7 @@
763 763
  */
764 764
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
765 765
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
766
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
766 767
 
767 768
 // For M851 give a range for adjusting the Z probe offset
768 769
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Felix/Configuration.h Visa fil

@@ -735,6 +735,7 @@
735 735
  */
736 736
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
737 737
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
738
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
738 739
 
739 740
 // For M851 give a range for adjusting the Z probe offset
740 741
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Felix/DUAL/Configuration.h Visa fil

@@ -735,6 +735,7 @@
735 735
  */
736 736
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
737 737
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
738
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
738 739
 
739 740
 // For M851 give a range for adjusting the Z probe offset
740 741
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h Visa fil

@@ -760,6 +760,7 @@
760 760
  */
761 761
 #define Z_CLEARANCE_DEPLOY_PROBE    3 // Z Clearance for Deploy/Stow
762 762
 #define Z_CLEARANCE_BETWEEN_PROBES  3 // Z Clearance between probe points
763
+//#define Z_AFTER_PROBING           3 // Z position after probing is done
763 764
 
764 765
 // For M851 give a range for adjusting the Z probe offset
765 766
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Geeetech/GT2560/Configuration.h Visa fil

@@ -768,6 +768,7 @@
768 768
  */
769 769
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
770 770
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
771
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
771 772
 
772 773
 // For M851 give a range for adjusting the Z probe offset
773 774
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h Visa fil

@@ -753,6 +753,7 @@
753 753
  */
754 754
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
755 755
 #define Z_CLEARANCE_BETWEEN_PROBES  6 // Z Clearance between probe points
756
+//#define Z_AFTER_PROBING           6 // Z position after probing is done
756 757
 
757 758
 // For M851 give a range for adjusting the Z probe offset
758 759
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h Visa fil

@@ -769,6 +769,7 @@
769 769
  */
770 770
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
771 771
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
772
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
772 773
 
773 774
 // For M851 give a range for adjusting the Z probe offset
774 775
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h Visa fil

@@ -768,6 +768,7 @@
768 768
  */
769 769
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
770 770
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
771
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
771 772
 
772 773
 // For M851 give a range for adjusting the Z probe offset
773 774
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Infitary/i3-M508/Configuration.h Visa fil

@@ -757,6 +757,7 @@
757 757
  */
758 758
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
759 759
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
760
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
760 761
 
761 762
 // For M851 give a range for adjusting the Z probe offset
762 763
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/JGAurora/A5/Configuration.h Visa fil

@@ -765,6 +765,7 @@
765 765
  */
766 766
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
767 767
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
768
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
768 769
 
769 770
 // For M851 give a range for adjusting the Z probe offset
770 771
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/MakerParts/Configuration.h Visa fil

@@ -773,6 +773,7 @@
773 773
  */
774 774
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
775 775
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
776
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
776 777
 
777 778
 // For M851 give a range for adjusting the Z probe offset
778 779
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 3
- 2
Marlin/src/config/examples/Malyan/M150/Configuration.h Visa fil

@@ -775,8 +775,9 @@
775 775
  * Example: `M851 Z-5` with a CLEARANCE of 4  =>  9mm from bed to nozzle.
776 776
  *     But: `M851 Z+1` with a CLEARANCE of 2  =>  2mm from bed to nozzle.
777 777
  */
778
-//#define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
779
-//#define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
778
+#define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
779
+#define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
780
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
780 781
 
781 782
 // For M851 give a range for adjusting the Z probe offset
782 783
 //#define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Malyan/M200/Configuration.h Visa fil

@@ -752,6 +752,7 @@
752 752
  */
753 753
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
754 754
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
755
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
755 756
 
756 757
 // For M851 give a range for adjusting the Z probe offset
757 758
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Micromake/C1/basic/Configuration.h Visa fil

@@ -757,6 +757,7 @@
757 757
  */
758 758
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
759 759
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
760
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
760 761
 
761 762
 // For M851 give a range for adjusting the Z probe offset
762 763
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h Visa fil

@@ -757,6 +757,7 @@
757 757
  */
758 758
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
759 759
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
760
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
760 761
 
761 762
 // For M851 give a range for adjusting the Z probe offset
762 763
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Mks/Sbase/Configuration.h Visa fil

@@ -753,6 +753,7 @@
753 753
  */
754 754
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
755 755
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
756
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
756 757
 
757 758
 // For M851 give a range for adjusting the Z probe offset
758 759
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h Visa fil

@@ -753,6 +753,7 @@
753 753
  */
754 754
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
755 755
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
756
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
756 757
 
757 758
 // For M851 give a range for adjusting the Z probe offset
758 759
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/RigidBot/Configuration.h Visa fil

@@ -751,6 +751,7 @@
751 751
  */
752 752
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
753 753
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
754
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
754 755
 
755 756
 // For M851 give a range for adjusting the Z probe offset
756 757
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/SCARA/Configuration.h Visa fil

@@ -764,6 +764,7 @@
764 764
  */
765 765
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
766 766
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
767
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
767 768
 
768 769
 // For M851 give a range for adjusting the Z probe offset
769 770
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/STM32F10/Configuration.h Visa fil

@@ -756,6 +756,7 @@
756 756
  */
757 757
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
758 758
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
759
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
759 760
 
760 761
 // For M851 give a range for adjusting the Z probe offset
761 762
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Sanguinololu/Configuration.h Visa fil

@@ -784,6 +784,7 @@
784 784
  */
785 785
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
786 786
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
787
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
787 788
 
788 789
 // For M851 give a range for adjusting the Z probe offset
789 790
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/TheBorg/Configuration.h Visa fil

@@ -753,6 +753,7 @@
753 753
  */
754 754
 #define Z_CLEARANCE_DEPLOY_PROBE    5 // Z Clearance for Deploy/Stow
755 755
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
756
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
756 757
 
757 758
 // For M851 give a range for adjusting the Z probe offset
758 759
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/TinyBoy2/Configuration.h Visa fil

@@ -804,6 +804,7 @@
804 804
  */
805 805
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
806 806
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
807
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
807 808
 
808 809
 // For M851 give a range for adjusting the Z probe offset
809 810
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Tronxy/X1/Configuration.h Visa fil

@@ -753,6 +753,7 @@
753 753
  */
754 754
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
755 755
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
756
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
756 757
 
757 758
 // For M851 give a range for adjusting the Z probe offset
758 759
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Tronxy/X5S/Configuration.h Visa fil

@@ -753,6 +753,7 @@
753 753
  */
754 754
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
755 755
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
756
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
756 757
 
757 758
 // For M851 give a range for adjusting the Z probe offset
758 759
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Tronxy/XY100/Configuration.h Visa fil

@@ -764,6 +764,7 @@
764 764
  */
765 765
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
766 766
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
767
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
767 768
 
768 769
 // For M851 give a range for adjusting the Z probe offset
769 770
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h Visa fil

@@ -753,6 +753,7 @@
753 753
  */
754 754
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
755 755
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
756
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
756 757
 
757 758
 // For M851 give a range for adjusting the Z probe offset
758 759
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Velleman/K8200/Configuration.h Visa fil

@@ -782,6 +782,7 @@
782 782
  */
783 783
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
784 784
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
785
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
785 786
 
786 787
 // For M851 give a range for adjusting the Z probe offset
787 788
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Velleman/K8400/Configuration.h Visa fil

@@ -753,6 +753,7 @@
753 753
  */
754 754
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
755 755
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
756
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
756 757
 
757 758
 // For M851 give a range for adjusting the Z probe offset
758 759
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h Visa fil

@@ -753,6 +753,7 @@
753 753
  */
754 754
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
755 755
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
756
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
756 757
 
757 758
 // For M851 give a range for adjusting the Z probe offset
758 759
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h Visa fil

@@ -763,6 +763,7 @@
763 763
  */
764 764
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
765 765
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
766
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
766 767
 
767 768
 // For M851 give a range for adjusting the Z probe offset
768 769
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/adafruit/ST7565/Configuration.h Visa fil

@@ -753,6 +753,7 @@
753 753
  */
754 754
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
755 755
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
756
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
756 757
 
757 758
 // For M851 give a range for adjusting the Z probe offset
758 759
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h Visa fil

@@ -883,6 +883,7 @@
883 883
  */
884 884
 #define Z_CLEARANCE_DEPLOY_PROBE    5 // Z Clearance for Deploy/Stow
885 885
 #define Z_CLEARANCE_BETWEEN_PROBES  2 // Z Clearance between probe points
886
+//#define Z_AFTER_PROBING           2 // Z position after probing is done
886 887
 
887 888
 // For M851 give a range for adjusting the Z probe offset
888 889
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h Visa fil

@@ -883,6 +883,7 @@
883 883
  */
884 884
 #define Z_CLEARANCE_DEPLOY_PROBE    5 // Z Clearance for Deploy/Stow
885 885
 #define Z_CLEARANCE_BETWEEN_PROBES  2 // Z Clearance between probe points
886
+//#define Z_AFTER_PROBING           2 // Z position after probing is done
886 887
 
887 888
 // For M851 give a range for adjusting the Z probe offset
888 889
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h Visa fil

@@ -883,6 +883,7 @@
883 883
  */
884 884
 #define Z_CLEARANCE_DEPLOY_PROBE   50 // Z Clearance for Deploy/Stow
885 885
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
886
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
886 887
 
887 888
 // For M851 give a range for adjusting the Z probe offset
888 889
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h Visa fil

@@ -885,6 +885,7 @@
885 885
  */
886 886
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
887 887
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
888
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
888 889
 
889 890
 // For M851 give a range for adjusting the Z probe offset
890 891
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/delta/generic/Configuration.h Visa fil

@@ -870,6 +870,7 @@
870 870
  */
871 871
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
872 872
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
873
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
873 874
 
874 875
 // For M851 give a range for adjusting the Z probe offset
875 876
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/delta/kossel_mini/Configuration.h Visa fil

@@ -873,6 +873,7 @@
873 873
  */
874 874
 #define Z_CLEARANCE_DEPLOY_PROBE   50 // Z Clearance for Deploy/Stow
875 875
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
876
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
876 877
 
877 878
 // For M851 give a range for adjusting the Z probe offset
878 879
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/delta/kossel_pro/Configuration.h Visa fil

@@ -872,6 +872,7 @@
872 872
  */
873 873
 #define Z_CLEARANCE_DEPLOY_PROBE   100 // Z Clearance for Deploy/Stow
874 874
 #define Z_CLEARANCE_BETWEEN_PROBES   5 // Z Clearance between probe points
875
+//#define Z_AFTER_PROBING            5 // Z position after probing is done
875 876
 
876 877
 // For M851 give a range for adjusting the Z probe offset
877 878
 

+ 1
- 0
Marlin/src/config/examples/delta/kossel_xl/Configuration.h Visa fil

@@ -882,6 +882,7 @@
882 882
  */
883 883
 #define Z_CLEARANCE_DEPLOY_PROBE   20 // Z Clearance for Deploy/Stow
884 884
 #define Z_CLEARANCE_BETWEEN_PROBES 10 // Z Clearance between probe points
885
+//#define Z_AFTER_PROBING          10 // Z position after probing is done
885 886
 
886 887
 // For M851 give a range for adjusting the Z probe offset
887 888
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h Visa fil

@@ -766,6 +766,7 @@
766 766
  */
767 767
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
768 768
 #define Z_CLEARANCE_BETWEEN_PROBES  6 // Z Clearance between probe points
769
+//#define Z_AFTER_PROBING           6 // Z position after probing is done
769 770
 
770 771
 // For M851 give a range for adjusting the Z probe offset
771 772
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/makibox/Configuration.h Visa fil

@@ -756,6 +756,7 @@
756 756
  */
757 757
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
758 758
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
759
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
759 760
 
760 761
 // For M851 give a range for adjusting the Z probe offset
761 762
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/stm32f103ret6/Configuration.h Visa fil

@@ -754,6 +754,7 @@
754 754
  */
755 755
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
756 756
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
757
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
757 758
 
758 759
 // For M851 give a range for adjusting the Z probe offset
759 760
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/tvrrug/Round2/Configuration.h Visa fil

@@ -748,6 +748,7 @@
748 748
  */
749 749
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
750 750
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
751
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
751 752
 
752 753
 // For M851 give a range for adjusting the Z probe offset
753 754
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 1
- 0
Marlin/src/config/examples/wt150/Configuration.h Visa fil

@@ -758,6 +758,7 @@
758 758
  */
759 759
 #define Z_CLEARANCE_DEPLOY_PROBE   10 // Z Clearance for Deploy/Stow
760 760
 #define Z_CLEARANCE_BETWEEN_PROBES  5 // Z Clearance between probe points
761
+//#define Z_AFTER_PROBING           5 // Z position after probing is done
761 762
 
762 763
 // For M851 give a range for adjusting the Z probe offset
763 764
 #define Z_PROBE_OFFSET_RANGE_MIN -20

+ 7
- 0
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp Visa fil

@@ -391,6 +391,7 @@
391 391
           restore_ubl_active_state_and_leave();
392 392
         }
393 393
         do_blocking_move_to_xy(0.5 * (MESH_MAX_X - (MESH_MIN_X)), 0.5 * (MESH_MAX_Y - (MESH_MIN_Y)));
394
+        report_current_position();
394 395
       }
395 396
 
396 397
     #endif // HAS_BED_PROBE
@@ -428,6 +429,8 @@
428 429
             }
429 430
             probe_entire_mesh(g29_x_pos + X_PROBE_OFFSET_FROM_EXTRUDER, g29_y_pos + Y_PROBE_OFFSET_FROM_EXTRUDER,
430 431
                               parser.seen('T'), parser.seen('E'), parser.seen('U'));
432
+
433
+            report_current_position();
431 434
             break;
432 435
 
433 436
         #endif // HAS_BED_PROBE
@@ -475,6 +478,8 @@
475 478
 
476 479
             SERIAL_PROTOCOLLNPGM("G29 P2 finished.");
477 480
 
481
+            report_current_position();
482
+
478 483
           #else
479 484
 
480 485
             SERIAL_PROTOCOLLNPGM("?P2 is only available when an LCD is present.");
@@ -758,6 +763,8 @@
758 763
       } while (location.x_index >= 0 && --count);
759 764
 
760 765
       STOW_PROBE();
766
+      move_z_after_probing();
767
+
761 768
       restore_ubl_active_state_and_leave();
762 769
 
763 770
       do_blocking_move_to_xy(

+ 7
- 3
Marlin/src/gcode/bedlevel/abl/G29.cpp Visa fil

@@ -733,7 +733,7 @@ void GcodeSuite::G29() {
733 733
 
734 734
     #endif // AUTO_BED_LEVELING_3POINT
735 735
 
736
-    // Stow the probe, raising if not fix-mounted.
736
+    // Stow the probe. No raise for FIX_MOUNTED_PROBE.
737 737
     if (STOW_PROBE()) {
738 738
       set_bed_leveling_enabled(abl_should_enable);
739 739
       measured_z = NAN;
@@ -967,12 +967,16 @@ void GcodeSuite::G29() {
967 967
     if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< G29");
968 968
   #endif
969 969
 
970
-  report_current_position();
971
-
972 970
   KEEPALIVE_STATE(IN_HANDLER);
973 971
 
974 972
   if (planner.leveling_active)
975 973
     SYNC_PLAN_POSITION_KINEMATIC();
974
+
975
+  #if HAS_BED_PROBE
976
+    move_z_after_probing();
977
+  #endif
978
+
979
+  report_current_position();
976 980
 }
977 981
 
978 982
 #endif // OLDSCHOOL_ABL

+ 7
- 0
Marlin/src/gcode/calibrate/G28.cpp Visa fil

@@ -39,6 +39,10 @@
39 39
   #include "../../feature/tmc_util.h"
40 40
 #endif
41 41
 
42
+#if HOMING_Z_WITH_PROBE
43
+  #include "../../module/probe.h"
44
+#endif
45
+
42 46
 #include "../../lcd/ultralcd.h"
43 47
 
44 48
 #if ENABLED(QUICK_HOME)
@@ -304,6 +308,9 @@ void GcodeSuite::G28(const bool always_home_all) {
304 308
           HOMEAXIS(Z);
305 309
         #endif
306 310
       } // home_all || homeZ
311
+      #if HOMING_Z_WITH_PROBE
312
+        move_z_after_probing();
313
+      #endif
307 314
     #endif // Z_HOME_DIR < 0
308 315
 
309 316
     SYNC_PLAN_POSITION_KINEMATIC();

+ 4
- 1
Marlin/src/gcode/probe/G30.cpp Visa fil

@@ -51,7 +51,8 @@ void GcodeSuite::G30() {
51 51
 
52 52
   setup_for_endstop_or_probe_move();
53 53
 
54
-  const float measured_z = probe_pt(xpos, ypos, parser.boolval('E'), 1);
54
+  const bool do_stow = parser.boolval('E');
55
+  const float measured_z = probe_pt(xpos, ypos, do_stow, 1);
55 56
 
56 57
   if (!isnan(measured_z)) {
57 58
     SERIAL_PROTOCOLPAIR("Bed X: ", FIXFLOAT(xpos));
@@ -61,6 +62,8 @@ void GcodeSuite::G30() {
61 62
 
62 63
   clean_up_after_endstop_or_probe_move();
63 64
 
65
+  if (do_stow) move_z_after_probing();
66
+
64 67
   report_current_position();
65 68
 }
66 69
 

+ 10
- 2
Marlin/src/gcode/probe/M401_M402.cpp Visa fil

@@ -25,16 +25,24 @@
25 25
 #if HAS_BED_PROBE
26 26
 
27 27
 #include "../gcode.h"
28
+#include "../../module/motion.h"
28 29
 #include "../../module/probe.h"
29 30
 
30 31
 /**
31 32
  * M401: Deploy and activate the Z probe
32 33
  */
33
-void GcodeSuite::M401() { DEPLOY_PROBE(); }
34
+void GcodeSuite::M401() {
35
+  DEPLOY_PROBE();
36
+  report_current_position();
37
+}
34 38
 
35 39
 /**
36 40
  * M402: Deactivate and stow the Z probe
37 41
  */
38
-void GcodeSuite::M402() { STOW_PROBE(); }
42
+void GcodeSuite::M402() {
43
+  STOW_PROBE();
44
+  move_z_after_probing();
45
+  report_current_position();
46
+}
39 47
 
40 48
 #endif // HAS_BED_PROBE

+ 3
- 1
Marlin/src/inc/SanityCheck.h Visa fil

@@ -162,7 +162,7 @@
162 162
 #elif defined(MIN_Z_HEIGHT_FOR_HOMING)
163 163
   #error "MIN_Z_HEIGHT_FOR_HOMING is now Z_HOMING_HEIGHT. Please update your configuration."
164 164
 #elif defined(Z_RAISE_BEFORE_PROBING) || defined(Z_RAISE_AFTER_PROBING)
165
-  #error "Z_RAISE_(BEFORE|AFTER)_PROBING are deprecated. Use Z_CLEARANCE_DEPLOY_PROBE instead."
165
+  #error "Z_RAISE_(BEFORE|AFTER)_PROBING are deprecated. Use Z_CLEARANCE_DEPLOY_PROBE and Z_AFTER_PROBING instead."
166 166
 #elif defined(Z_RAISE_PROBE_DEPLOY_STOW) || defined(Z_RAISE_BETWEEN_PROBINGS)
167 167
   #error "Z_RAISE_PROBE_DEPLOY_STOW and Z_RAISE_BETWEEN_PROBINGS are now Z_CLEARANCE_DEPLOY_PROBE and Z_CLEARANCE_BETWEEN_PROBES. Please update your configuration."
168 168
 #elif defined(Z_PROBE_DEPLOY_HEIGHT) || defined(Z_PROBE_TRAVEL_HEIGHT)
@@ -789,6 +789,8 @@ static_assert(1 >= 0
789 789
     #error "Probes need Z_CLEARANCE_DEPLOY_PROBE >= 0."
790 790
   #elif Z_CLEARANCE_BETWEEN_PROBES < 0
791 791
     #error "Probes need Z_CLEARANCE_BETWEEN_PROBES >= 0."
792
+  #elif Z_AFTER_PROBING < 0
793
+    #error "Probes need Z_AFTER_PROBING >= 0."
792 794
   #endif
793 795
 
794 796
   #if MULTIPLE_PROBING && MULTIPLE_PROBING < 2

+ 10
- 0
Marlin/src/module/probe.cpp Visa fil

@@ -465,6 +465,16 @@ bool set_probe_deployed(const bool deploy) {
465 465
   return false;
466 466
 }
467 467
 
468
+#ifdef Z_AFTER_PROBING
469
+  // After probing move to a preferred Z position
470
+  void move_z_after_probing() {
471
+    if (current_position[Z_AXIS] != Z_AFTER_PROBING) {
472
+      do_blocking_move_to_z(Z_AFTER_PROBING);
473
+      current_position[Z_AXIS] = Z_AFTER_PROBING;
474
+    }
475
+  }
476
+#endif
477
+
468 478
 /**
469 479
  * @brief Used by run_z_probe to do a single Z probe move.
470 480
  *

+ 5
- 0
Marlin/src/module/probe.h Visa fil

@@ -32,6 +32,11 @@
32 32
 #if HAS_BED_PROBE
33 33
   extern float zprobe_zoffset;
34 34
   bool set_probe_deployed(const bool deploy);
35
+  #ifdef Z_AFTER_PROBING
36
+    void move_z_after_probing();
37
+  #else
38
+    inline void move_z_after_probing() {}
39
+  #endif
35 40
   float probe_pt(const float &rx, const float &ry, const bool, const uint8_t, const bool probe_relative=true);
36 41
   #define DEPLOY_PROBE() set_probe_deployed(true)
37 42
   #define STOW_PROBE() set_probe_deployed(false)

Laddar…
Avbryt
Spara