浏览代码

Merge pull request #7816 from thinkyhead/bf2_inhibit_option

[2.0.x] Option to disallow motion before homing
Scott Lahteine 7 年前
父节点
当前提交
f3677e077c
共有 44 个文件被更改,包括 129 次插入60 次删除
  1. 2
    0
      Marlin/Configuration.h
  2. 2
    0
      Marlin/src/config/default/Configuration.h
  3. 2
    0
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
  4. 2
    0
      Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
  5. 2
    0
      Marlin/src/config/examples/Anet/A6/Configuration.h
  6. 2
    0
      Marlin/src/config/examples/Anet/A8/Configuration.h
  7. 2
    0
      Marlin/src/config/examples/BQ/Hephestos/Configuration.h
  8. 2
    0
      Marlin/src/config/examples/BQ/WITBOX/Configuration.h
  9. 2
    0
      Marlin/src/config/examples/Cartesio/Configuration.h
  10. 2
    0
      Marlin/src/config/examples/Creality/CR-10/Configuration.h
  11. 2
    0
      Marlin/src/config/examples/Felix/Configuration.h
  12. 2
    0
      Marlin/src/config/examples/Felix/DUAL/Configuration.h
  13. 2
    0
      Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
  14. 2
    0
      Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
  15. 2
    0
      Marlin/src/config/examples/Malyan/M150/Configuration.h
  16. 2
    0
      Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
  17. 2
    0
      Marlin/src/config/examples/RigidBot/Configuration.h
  18. 2
    0
      Marlin/src/config/examples/SCARA/Configuration.h
  19. 2
    0
      Marlin/src/config/examples/TinyBoy2/Configuration.h
  20. 2
    0
      Marlin/src/config/examples/Velleman/K8400/Configuration.h
  21. 2
    0
      Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h
  22. 2
    0
      Marlin/src/config/examples/adafruit/ST7565/Configuration.h
  23. 2
    0
      Marlin/src/config/examples/delta/generic/Configuration.h
  24. 2
    0
      Marlin/src/config/examples/delta/kossel_mini/Configuration.h
  25. 2
    0
      Marlin/src/config/examples/delta/kossel_pro/Configuration.h
  26. 2
    0
      Marlin/src/config/examples/delta/kossel_xl/Configuration.h
  27. 2
    0
      Marlin/src/config/examples/makibox/Configuration.h
  28. 2
    0
      Marlin/src/config/examples/stm32f103ret6/Configuration.h
  29. 2
    0
      Marlin/src/config/examples/tvrrug/Round2/Configuration.h
  30. 2
    0
      Marlin/src/config/examples/wt150/Configuration.h
  31. 1
    1
      Marlin/src/gcode/bedlevel/G42.cpp
  32. 1
    1
      Marlin/src/gcode/motion/G0_G1.cpp
  33. 1
    1
      Marlin/src/gcode/motion/G2_G3.cpp
  34. 1
    1
      Marlin/src/gcode/motion/G5.cpp
  35. 1
    1
      Marlin/src/inc/SPI.h
  36. 1
    1
      Marlin/src/inc/SanityCheck.h
  37. 10
    10
      Marlin/src/lcd/ultralcd.cpp
  38. 3
    3
      Marlin/src/module/motion.cpp
  39. 17
    3
      Marlin/src/module/motion.h
  40. 1
    1
      Marlin/src/module/probe.cpp
  41. 2
    2
      Marlin/src/module/stepper.cpp
  42. 1
    1
      Marlin/src/pins/pins_ANET_10.h
  43. 24
    29
      Marlin/src/pins/pins_RAMPS_RE_ARM.h
  44. 5
    5
      frameworks/CMSIS/LPC1768/include/lpc_types.h

+ 2
- 0
Marlin/Configuration.h 查看文件

@@ -760,6 +760,8 @@
760 760
 
761 761
 // @section homing
762 762
 
763
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
764
+
763 765
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
764 766
                              // Be sure you have this distance over your Z_MAX_POS in case.
765 767
 

+ 2
- 0
Marlin/src/config/default/Configuration.h 查看文件

@@ -760,6 +760,8 @@
760 760
 
761 761
 // @section homing
762 762
 
763
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
764
+
763 765
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
764 766
                              // Be sure you have this distance over your Z_MAX_POS in case.
765 767
 

+ 2
- 0
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h 查看文件

@@ -780,6 +780,8 @@
780 780
 
781 781
 // @section homing
782 782
 
783
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
784
+
783 785
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
784 786
                              // Be sure you have this distance over your Z_MAX_POS in case.
785 787
 

+ 2
- 0
Marlin/src/config/examples/AliExpress/CL-260/Configuration.h 查看文件

@@ -760,6 +760,8 @@
760 760
 
761 761
 // @section homing
762 762
 
763
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
764
+
763 765
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
764 766
                              // Be sure you have this distance over your Z_MAX_POS in case.
765 767
 

+ 2
- 0
Marlin/src/config/examples/Anet/A6/Configuration.h 查看文件

@@ -844,6 +844,8 @@
844 844
 
845 845
 // @section homing
846 846
 
847
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
848
+
847 849
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
848 850
                              // Be sure you have this distance over your Z_MAX_POS in case.
849 851
 

+ 2
- 0
Marlin/src/config/examples/Anet/A8/Configuration.h 查看文件

@@ -766,6 +766,8 @@
766 766
 
767 767
 // @section homing
768 768
 
769
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
770
+
769 771
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
770 772
                              // Be sure you have this distance over your Z_MAX_POS in case.
771 773
 

+ 2
- 0
Marlin/src/config/examples/BQ/Hephestos/Configuration.h 查看文件

@@ -751,6 +751,8 @@
751 751
 
752 752
 // @section homing
753 753
 
754
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
755
+
754 756
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
755 757
                              // Be sure you have this distance over your Z_MAX_POS in case.
756 758
 

+ 2
- 0
Marlin/src/config/examples/BQ/WITBOX/Configuration.h 查看文件

@@ -751,6 +751,8 @@
751 751
 
752 752
 // @section homing
753 753
 
754
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
755
+
754 756
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
755 757
                              // Be sure you have this distance over your Z_MAX_POS in case.
756 758
 

+ 2
- 0
Marlin/src/config/examples/Cartesio/Configuration.h 查看文件

@@ -759,6 +759,8 @@
759 759
 
760 760
 // @section homing
761 761
 
762
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
763
+
762 764
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
763 765
                              // Be sure you have this distance over your Z_MAX_POS in case.
764 766
 

+ 2
- 0
Marlin/src/config/examples/Creality/CR-10/Configuration.h 查看文件

@@ -770,6 +770,8 @@
770 770
 
771 771
 // @section homing
772 772
 
773
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
774
+
773 775
 //#define Z_HOMING_HEIGHT 5  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
774 776
                              // Be sure you have this distance over your Z_MAX_POS in case.
775 777
 

+ 2
- 0
Marlin/src/config/examples/Felix/Configuration.h 查看文件

@@ -742,6 +742,8 @@
742 742
 
743 743
 // @section homing
744 744
 
745
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
746
+
745 747
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
746 748
                              // Be sure you have this distance over your Z_MAX_POS in case.
747 749
 

+ 2
- 0
Marlin/src/config/examples/Felix/DUAL/Configuration.h 查看文件

@@ -742,6 +742,8 @@
742 742
 
743 743
 // @section homing
744 744
 
745
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
746
+
745 747
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
746 748
                              // Be sure you have this distance over your Z_MAX_POS in case.
747 749
 

+ 2
- 0
Marlin/src/config/examples/Geeetech/GT2560/Configuration.h 查看文件

@@ -775,6 +775,8 @@
775 775
 
776 776
 // @section homing
777 777
 
778
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
779
+
778 780
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
779 781
                              // Be sure you have this distance over your Z_MAX_POS in case.
780 782
 

+ 2
- 0
Marlin/src/config/examples/Infitary/i3-M508/Configuration.h 查看文件

@@ -764,6 +764,8 @@
764 764
 
765 765
 // @section homing
766 766
 
767
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
768
+
767 769
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
768 770
                              // Be sure you have this distance over your Z_MAX_POS in case.
769 771
 

+ 2
- 0
Marlin/src/config/examples/Malyan/M150/Configuration.h 查看文件

@@ -784,6 +784,8 @@
784 784
 
785 785
 // @section homing
786 786
 
787
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
788
+
787 789
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
788 790
                              // Be sure you have this distance over your Z_MAX_POS in case.
789 791
 

+ 2
- 0
Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h 查看文件

@@ -760,6 +760,8 @@
760 760
 
761 761
 // @section homing
762 762
 
763
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
764
+
763 765
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
764 766
                              // Be sure you have this distance over your Z_MAX_POS in case.
765 767
 

+ 2
- 0
Marlin/src/config/examples/RigidBot/Configuration.h 查看文件

@@ -758,6 +758,8 @@
758 758
 
759 759
 // @section homing
760 760
 
761
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
762
+
761 763
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
762 764
                              // Be sure you have this distance over your Z_MAX_POS in case.
763 765
 

+ 2
- 0
Marlin/src/config/examples/SCARA/Configuration.h 查看文件

@@ -772,6 +772,8 @@
772 772
 
773 773
 // @section homing
774 774
 
775
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
776
+
775 777
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
776 778
                              // Be sure you have this distance over your Z_MAX_POS in case.
777 779
 

+ 2
- 0
Marlin/src/config/examples/TinyBoy2/Configuration.h 查看文件

@@ -811,6 +811,8 @@
811 811
 
812 812
 // @section homing
813 813
 
814
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
815
+
814 816
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
815 817
                              // Be sure you have this distance over your Z_MAX_POS in case.
816 818
 

+ 2
- 0
Marlin/src/config/examples/Velleman/K8400/Configuration.h 查看文件

@@ -760,6 +760,8 @@
760 760
 
761 761
 // @section homing
762 762
 
763
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
764
+
763 765
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
764 766
                              // Be sure you have this distance over your Z_MAX_POS in case.
765 767
 

+ 2
- 0
Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h 查看文件

@@ -760,6 +760,8 @@
760 760
 
761 761
 // @section homing
762 762
 
763
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
764
+
763 765
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
764 766
                              // Be sure you have this distance over your Z_MAX_POS in case.
765 767
 

+ 2
- 0
Marlin/src/config/examples/adafruit/ST7565/Configuration.h 查看文件

@@ -760,6 +760,8 @@
760 760
 
761 761
 // @section homing
762 762
 
763
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
764
+
763 765
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
764 766
                              // Be sure you have this distance over your Z_MAX_POS in case.
765 767
 

+ 2
- 0
Marlin/src/config/examples/delta/generic/Configuration.h 查看文件

@@ -871,6 +871,8 @@
871 871
 
872 872
 // @section homing
873 873
 
874
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
875
+
874 876
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
875 877
                              // Be sure you have this distance over your Z_MAX_POS in case.
876 878
 

+ 2
- 0
Marlin/src/config/examples/delta/kossel_mini/Configuration.h 查看文件

@@ -874,6 +874,8 @@
874 874
 
875 875
 // @section homing
876 876
 
877
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
878
+
877 879
 //#define Z_HOMING_HEIGHT 15 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
878 880
                              // Be sure you have this distance over your Z_MAX_POS in case.
879 881
 

+ 2
- 0
Marlin/src/config/examples/delta/kossel_pro/Configuration.h 查看文件

@@ -874,6 +874,8 @@
874 874
 
875 875
 // @section homing
876 876
 
877
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
878
+
877 879
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
878 880
                              // Be sure you have this distance over your Z_MAX_POS in case.
879 881
 

+ 2
- 0
Marlin/src/config/examples/delta/kossel_xl/Configuration.h 查看文件

@@ -883,6 +883,8 @@
883 883
 
884 884
 // @section homing
885 885
 
886
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
887
+
886 888
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
887 889
                              // Be sure you have this distance over your Z_MAX_POS in case.
888 890
 

+ 2
- 0
Marlin/src/config/examples/makibox/Configuration.h 查看文件

@@ -763,6 +763,8 @@
763 763
 
764 764
 // @section homing
765 765
 
766
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
767
+
766 768
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
767 769
                              // Be sure you have this distance over your Z_MAX_POS in case.
768 770
 

+ 2
- 0
Marlin/src/config/examples/stm32f103ret6/Configuration.h 查看文件

@@ -746,6 +746,8 @@
746 746
 
747 747
 // @section homing
748 748
 
749
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
750
+
749 751
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
750 752
                              // Be sure you have this distance over your Z_MAX_POS in case.
751 753
 

+ 2
- 0
Marlin/src/config/examples/tvrrug/Round2/Configuration.h 查看文件

@@ -755,6 +755,8 @@
755 755
 
756 756
 // @section homing
757 757
 
758
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
759
+
758 760
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
759 761
                              // Be sure you have this distance over your Z_MAX_POS in case.
760 762
 

+ 2
- 0
Marlin/src/config/examples/wt150/Configuration.h 查看文件

@@ -765,6 +765,8 @@
765 765
 
766 766
 // @section homing
767 767
 
768
+//#define NO_MOTION_BEFORE_HOMING  // Inhibit movement until all axes have been homed
769
+
768 770
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
769 771
                              // Be sure you have this distance over your Z_MAX_POS in case.
770 772
 

+ 1
- 1
Marlin/src/gcode/bedlevel/G42.cpp 查看文件

@@ -33,7 +33,7 @@
33 33
  * G42: Move X & Y axes to mesh coordinates (I & J)
34 34
  */
35 35
 void GcodeSuite::G42() {
36
-  if (IsRunning()) {
36
+  if (MOTION_CONDITIONS) {
37 37
     const bool hasI = parser.seenval('I');
38 38
     const int8_t ix = hasI ? parser.value_int() : 0;
39 39
     const bool hasJ = parser.seenval('J');

+ 1
- 1
Marlin/src/gcode/motion/G0_G1.cpp 查看文件

@@ -41,7 +41,7 @@ void GcodeSuite::G0_G1(
41 41
     bool fast_move/*=false*/
42 42
   #endif
43 43
 ) {
44
-  if (IsRunning()) {
44
+  if (MOTION_CONDITIONS) {
45 45
     get_destination_from_command(); // For X Y Z E F
46 46
 
47 47
     #if ENABLED(FWRETRACT)

+ 1
- 1
Marlin/src/gcode/motion/G2_G3.cpp 查看文件

@@ -211,7 +211,7 @@ void plan_arc(
211 211
  *    G3 X20 Y12 R14   ; CCW circle with r=14 ending at X20 Y12
212 212
  */
213 213
 void GcodeSuite::G2_G3(const bool clockwise) {
214
-  if (IsRunning()) {
214
+  if (MOTION_CONDITIONS) {
215 215
 
216 216
     #if ENABLED(SF_ARC_FIX)
217 217
       const bool relative_mode_backup = relative_mode;

+ 1
- 1
Marlin/src/gcode/motion/G5.cpp 查看文件

@@ -50,7 +50,7 @@ void plan_cubic_move(const float offset[4]) {
50 50
  * G5: Cubic B-spline
51 51
  */
52 52
 void GcodeSuite::G5() {
53
-  if (IsRunning()) {
53
+  if (MOTION_CONDITIONS) {
54 54
 
55 55
     #if ENABLED(CNC_WORKSPACE_PLANES)
56 56
       if (workspace_plane != PLANE_XY) {

+ 1
- 1
Marlin/src/inc/SPI.h 查看文件

@@ -1,7 +1,7 @@
1 1
 #include <stdint.h>
2 2
 
3 3
 
4
-#if !defined(SPI_FULL_SPEED)
4
+#ifndef SPI_FULL_SPEED
5 5
 
6 6
 /**
7 7
  * SPI speed where 0 <= index <= 6

+ 1
- 1
Marlin/src/inc/SanityCheck.h 查看文件

@@ -632,7 +632,7 @@ static_assert(1 >= 0
632 632
   /**
633 633
    * Make sure Z raise values are set
634 634
    */
635
-  #if !defined(Z_CLEARANCE_DEPLOY_PROBE)
635
+  #ifndef Z_CLEARANCE_DEPLOY_PROBE
636 636
     #error "You must define Z_CLEARANCE_DEPLOY_PROBE in your configuration."
637 637
   #elif !defined(Z_CLEARANCE_BETWEEN_PROBES)
638 638
     #error "You must define Z_CLEARANCE_BETWEEN_PROBES in your configuration."

+ 10
- 10
Marlin/src/lcd/ultralcd.cpp 查看文件

@@ -2928,19 +2928,19 @@ void kill_screen(const char* lcd_msg) {
2928 2928
    *
2929 2929
    */
2930 2930
 
2931
-  #if IS_KINEMATIC
2931
+  #if IS_KINEMATIC || ENABLED(NO_MOTION_BEFORE_HOMING)
2932 2932
     #define _MOVE_XYZ_ALLOWED (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS])
2933
-    #if ENABLED(DELTA)
2934
-      #define _MOVE_XY_ALLOWED (current_position[Z_AXIS] <= delta_clip_start_height)
2935
-      void lcd_lower_z_to_clip_height() {
2936
-        line_to_z(delta_clip_start_height);
2937
-        lcd_synchronize();
2938
-      }
2939
-    #else
2940
-      #define _MOVE_XY_ALLOWED true
2941
-    #endif
2942 2933
   #else
2943 2934
     #define _MOVE_XYZ_ALLOWED true
2935
+  #endif
2936
+
2937
+  #if ENABLED(DELTA)
2938
+    #define _MOVE_XY_ALLOWED (current_position[Z_AXIS] <= delta_clip_start_height)
2939
+    void lcd_lower_z_to_clip_height() {
2940
+      line_to_z(delta_clip_start_height);
2941
+      lcd_synchronize();
2942
+    }
2943
+  #else
2944 2944
     #define _MOVE_XY_ALLOWED true
2945 2945
   #endif
2946 2946
 

+ 3
- 3
Marlin/src/module/motion.cpp 查看文件

@@ -51,7 +51,7 @@
51 51
   #include "../feature/bedlevel/bedlevel.h"
52 52
 #endif
53 53
 
54
-#if NEED_UNHOMED_ERR && ENABLED(ULTRA_LCD)
54
+#if HAS_AXIS_UNHOMED_ERR && ENABLED(ULTRA_LCD)
55 55
   #include "../lcd/ultralcd.h"
56 56
 #endif
57 57
 
@@ -820,7 +820,7 @@ void prepare_move_to_destination() {
820 820
   set_current_to_destination();
821 821
 }
822 822
 
823
-#if NEED_UNHOMED_ERR
823
+#if HAS_AXIS_UNHOMED_ERR
824 824
 
825 825
   bool axis_unhomed_error(const bool x/*=true*/, const bool y/*=true*/, const bool z/*=true*/) {
826 826
     #if ENABLED(HOME_AFTER_DEACTIVATE)
@@ -848,7 +848,7 @@ void prepare_move_to_destination() {
848 848
     return false;
849 849
   }
850 850
 
851
-#endif
851
+#endif // HAS_AXIS_UNHOMED_ERR
852 852
 
853 853
 /**
854 854
  * The homing feedrate may vary

+ 17
- 3
Marlin/src/module/motion.h 查看文件

@@ -167,12 +167,26 @@ void clean_up_after_endstop_or_probe_move();
167 167
 // Homing
168 168
 //
169 169
 
170
-#define NEED_UNHOMED_ERR (HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE) || ENABLED(DELTA_AUTO_CALIBRATION))
171
-
172
-#if NEED_UNHOMED_ERR
170
+#define HAS_AXIS_UNHOMED_ERR (                                                     \
171
+         ENABLED(Z_PROBE_ALLEN_KEY)                                                \
172
+      || ENABLED(Z_PROBE_SLED)                                                     \
173
+      || HAS_PROBING_PROCEDURE                                                     \
174
+      || HOTENDS > 1                                                               \
175
+      || ENABLED(NOZZLE_CLEAN_FEATURE)                                             \
176
+      || ENABLED(NOZZLE_PARK_FEATURE)                                              \
177
+      || (ENABLED(ADVANCED_PAUSE_FEATURE) && ENABLED(HOME_BEFORE_FILAMENT_CHANGE)) \
178
+    ) || ENABLED(NO_MOTION_BEFORE_HOMING)
179
+
180
+#if HAS_AXIS_UNHOMED_ERR
173 181
   bool axis_unhomed_error(const bool x=true, const bool y=true, const bool z=true);
174 182
 #endif
175 183
 
184
+#if ENABLED(NO_MOTION_BEFORE_HOMING)
185
+  #define MOTION_CONDITIONS (IsRunning() && !axis_unhomed_error())
186
+#else
187
+  #define MOTION_CONDITIONS IsRunning()
188
+#endif
189
+
176 190
 void set_axis_is_at_home(const AxisEnum axis);
177 191
 
178 192
 void homeaxis(const AxisEnum axis);

+ 1
- 1
Marlin/src/module/probe.cpp 查看文件

@@ -276,7 +276,7 @@ inline void do_probe_raise(const float z_raise) {
276 276
     #endif
277 277
   }
278 278
 
279
-#endif
279
+#endif // Z_PROBE_ALLEN_KEY
280 280
 
281 281
 #if ENABLED(PROBING_FANS_OFF)
282 282
 

+ 2
- 2
Marlin/src/module/stepper.cpp 查看文件

@@ -323,7 +323,7 @@ void Stepper::isr() {
323 323
 
324 324
   HAL_TIMER_TYPE ocr_val;
325 325
 
326
-  #if defined(CPU_32_BIT)
326
+  #ifdef CPU_32_BIT
327 327
     #define ENDSTOP_NOMINAL_OCR_VAL 1500 * HAL_TICKS_PER_US    // check endstops every 1.5ms to guarantee two stepper ISRs within 5ms for BLTouch
328 328
     #define OCR_VAL_TOLERANCE 500 * HAL_TICKS_PER_US           // First max delay is 2.0ms, last min delay is 0.5ms, all others 1.5ms
329 329
   #else
@@ -335,7 +335,7 @@ void Stepper::isr() {
335 335
     // Disable Timer0 ISRs and enable global ISR again to capture UART events (incoming chars)
336 336
     DISABLE_TEMPERATURE_INTERRUPT(); // Temperature ISR
337 337
     DISABLE_STEPPER_DRIVER_INTERRUPT();
338
-    #if !defined(CPU_32_BIT)
338
+    #ifndef CPU_32_BIT
339 339
       sei();
340 340
     #endif
341 341
   #endif

+ 1
- 1
Marlin/src/pins/pins_ANET_10.h 查看文件

@@ -88,7 +88,7 @@
88 88
  *   Many thanks to Hans Raaf (@oderwat) for developing the Anet-specific software and supporting the Anet community.
89 89
 */
90 90
 
91
-#if !defined(__AVR_ATmega1284P__)
91
+#ifndef __AVR_ATmega1284P__
92 92
   #error "Oops!  Make sure you have 'Anet V1.0', 'Anet V1.0 (Optiboot)' or 'Sanguino' selected from the 'Tools -> Boards' menu."
93 93
 #endif
94 94
 

+ 24
- 29
Marlin/src/pins/pins_RAMPS_RE_ARM.h 查看文件

@@ -66,7 +66,7 @@
66 66
 #define Y_MAX_PIN          15  //10k pullup to 3.3V, 1K series
67 67
 #define Z_MIN_PIN          18  //10k pullup to 3.3V, 1K series
68 68
 #define Z_MAX_PIN          19  //10k pullup to 3.3V, 1K series
69
-//#define Z_probe_pin         1  // AUX-1
69
+//#define Z_PROBE_PIN         1  // AUX-1
70 70
 
71 71
 
72 72
 //
@@ -267,23 +267,18 @@
267 267
     //#define SHIFT_EN            41  // J5-4 & AUX-4
268 268
   #endif
269 269
 
270
-  #if ENABLED(SDSUPPORT)
271
-    #define SDCARD_SORT_ALPHA           // Using SORT feature to keep one directory level in RAM
272
-                                        // When going up/down directory levels the SD card is
273
-                                        // accessed but the garbage/lines are removed when the
274
-                                        // LCD updates
275
-
276
-    // SD Card Sorting options
277
-    #if ENABLED(SDCARD_SORT_ALPHA)
278
-      #define SDSORT_LIMIT       255    // Maximum number of sorted items (10-256). Costs 27 bytes each.
279
-      #define FOLDER_SORTING     -1     // -1=above  0=none  1=below
280
-      #define SDSORT_GCODE       false  // Allow turning sorting on/off with LCD and M34 g-code.
281
-      #define SDSORT_USES_RAM    true   // Pre-allocate a static array for faster pre-sorting.
282
-      #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
283
-      #define SDSORT_CACHE_NAMES true   // Keep sorted items in RAM longer for speedy performance. Most expensive option.
284
-      #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
285
-    #endif
286
-  #endif
270
+    #define SDCARD_SORT_ALPHA         // Using SORT feature to keep one directory level in RAM
271
+                                      // When going up/down directory levels the SD card is
272
+                                      // accessed but the garbage/lines are removed when the
273
+                                      // LCD updates
274
+
275
+    #define SDSORT_LIMIT       256    // Maximum number of sorted items (10-256). Costs 27 bytes each.
276
+    #define FOLDER_SORTING     -1     // -1=above  0=none  1=below
277
+    #define SDSORT_GCODE       false  // Allow turning sorting on/off with LCD and M34 g-code.
278
+    #define SDSORT_USES_RAM    true   // Pre-allocate a static array for faster pre-sorting.
279
+    #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
280
+    #define SDSORT_CACHE_NAMES true   // Keep sorted items in RAM longer for speedy performance. Most expensive option.
281
+    #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
287 282
 
288 283
  #if ENABLED(VIKI2) || ENABLED(miniVIKI)
289 284
 //    #define LCD_SCREEN_ROT_180
@@ -307,7 +302,7 @@
307 302
     #undef  LCD_PINS_D5         //59  // J3-8 & AUX-2
308 303
     #define DOGLCD_A0           59  // J3-8 & AUX-2
309 304
     #undef  LCD_PINS_D6         //63  // J5-3 & AUX-2
310
-    #undef  LCD_PINS_D7          //6  // (SERVO1) J5-1 & SERVO connector
305
+    #undef  LCD_PINS_D7         // 6  // (SERVO1) J5-1 & SERVO connector
311 306
     #define DOGLCD_SCK SCK_PIN
312 307
     #define DOGLCD_MOSI MOSI_PIN
313 308
 
@@ -335,17 +330,17 @@
335 330
 // Ethernet pins
336 331
 //
337 332
 #ifndef ULTIPANEL
338
-#define ENET_MDIO   71  // J12-4
339
-#define ENET_RX_ER  73  // J12-6
340
-#define ENET_RXD1   75  // J12-8
333
+  #define ENET_MDIO   71  // J12-4
334
+  #define ENET_RX_ER  73  // J12-6
335
+  #define ENET_RXD1   75  // J12-8
341 336
 #endif
342
-#define ENET_MOC    70  // J12-3
343
-#define REF_CLK     72  // J12-5
344
-#define ENET_RXD0   74  // J12-7
345
-#define ENET_CRS    76  // J12-9
346
-#define ENET_TX_EN  77  // J12-10
347
-#define ENET_TXD0   78  // J12-11
348
-#define ENET_TXD1   79  // J12-12
337
+#define ENET_MOC      70  // J12-3
338
+#define REF_CLK       72  // J12-5
339
+#define ENET_RXD0     74  // J12-7
340
+#define ENET_CRS      76  // J12-9
341
+#define ENET_TX_EN    77  // J12-10
342
+#define ENET_TXD0     78  // J12-11
343
+#define ENET_TXD1     79  // J12-12
349 344
 
350 345
 /**
351 346
  *  PWMS

+ 5
- 5
frameworks/CMSIS/LPC1768/include/lpc_types.h 查看文件

@@ -134,7 +134,7 @@ typedef int32_t(*PFI)();
134 134
 
135 135
 /* NULL pointer */
136 136
 #ifndef NULL
137
-#define NULL ((void*) 0)
137
+  #define NULL ((void*) 0)
138 138
 #endif
139 139
 
140 140
 /* Number of elements in an array */
@@ -145,11 +145,11 @@ typedef int32_t(*PFI)();
145 145
 /* External data/function define */
146 146
 #define EXTERN extern
147 147
 
148
-#if !defined(MAX)
149
-#define MAX(a, b) (((a) > (b)) ? (a) : (b))
148
+#ifndef MAX
149
+  #define MAX(a, b) (((a) > (b)) ? (a) : (b))
150 150
 #endif
151
-#if !defined(MIN)
152
-#define MIN(a, b) (((a) < (b)) ? (a) : (b))
151
+#ifndef MIN
152
+  #define MIN(a, b) (((a) < (b)) ? (a) : (b))
153 153
 #endif
154 154
 
155 155
 /**

正在加载...
取消
保存