Browse Source

Merge pull request #7816 from thinkyhead/bf2_inhibit_option

[2.0.x] Option to disallow motion before homing
Scott Lahteine 7 years ago
parent
commit
f3677e077c
44 changed files with 129 additions and 60 deletions
  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 View File

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

+ 2
- 0
Marlin/src/config/default/Configuration.h View File

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

+ 1
- 1
Marlin/src/gcode/bedlevel/G42.cpp View File

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

+ 1
- 1
Marlin/src/gcode/motion/G0_G1.cpp View File

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

+ 1
- 1
Marlin/src/gcode/motion/G2_G3.cpp View File

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

+ 1
- 1
Marlin/src/gcode/motion/G5.cpp View File

50
  * G5: Cubic B-spline
50
  * G5: Cubic B-spline
51
  */
51
  */
52
 void GcodeSuite::G5() {
52
 void GcodeSuite::G5() {
53
-  if (IsRunning()) {
53
+  if (MOTION_CONDITIONS) {
54
 
54
 
55
     #if ENABLED(CNC_WORKSPACE_PLANES)
55
     #if ENABLED(CNC_WORKSPACE_PLANES)
56
       if (workspace_plane != PLANE_XY) {
56
       if (workspace_plane != PLANE_XY) {

+ 1
- 1
Marlin/src/inc/SPI.h View File

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

+ 1
- 1
Marlin/src/inc/SanityCheck.h View File

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

+ 10
- 10
Marlin/src/lcd/ultralcd.cpp View File

2928
    *
2928
    *
2929
    */
2929
    */
2930
 
2930
 
2931
-  #if IS_KINEMATIC
2931
+  #if IS_KINEMATIC || ENABLED(NO_MOTION_BEFORE_HOMING)
2932
     #define _MOVE_XYZ_ALLOWED (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS])
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
   #else
2933
   #else
2943
     #define _MOVE_XYZ_ALLOWED true
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
     #define _MOVE_XY_ALLOWED true
2944
     #define _MOVE_XY_ALLOWED true
2945
   #endif
2945
   #endif
2946
 
2946
 

+ 3
- 3
Marlin/src/module/motion.cpp View File

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

+ 17
- 3
Marlin/src/module/motion.h View File

167
 // Homing
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
   bool axis_unhomed_error(const bool x=true, const bool y=true, const bool z=true);
181
   bool axis_unhomed_error(const bool x=true, const bool y=true, const bool z=true);
174
 #endif
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
 void set_axis_is_at_home(const AxisEnum axis);
190
 void set_axis_is_at_home(const AxisEnum axis);
177
 
191
 
178
 void homeaxis(const AxisEnum axis);
192
 void homeaxis(const AxisEnum axis);

+ 1
- 1
Marlin/src/module/probe.cpp View File

276
     #endif
276
     #endif
277
   }
277
   }
278
 
278
 
279
-#endif
279
+#endif // Z_PROBE_ALLEN_KEY
280
 
280
 
281
 #if ENABLED(PROBING_FANS_OFF)
281
 #if ENABLED(PROBING_FANS_OFF)
282
 
282
 

+ 2
- 2
Marlin/src/module/stepper.cpp View File

323
 
323
 
324
   HAL_TIMER_TYPE ocr_val;
324
   HAL_TIMER_TYPE ocr_val;
325
 
325
 
326
-  #if defined(CPU_32_BIT)
326
+  #ifdef CPU_32_BIT
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
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
     #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
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
   #else
329
   #else
335
     // Disable Timer0 ISRs and enable global ISR again to capture UART events (incoming chars)
335
     // Disable Timer0 ISRs and enable global ISR again to capture UART events (incoming chars)
336
     DISABLE_TEMPERATURE_INTERRUPT(); // Temperature ISR
336
     DISABLE_TEMPERATURE_INTERRUPT(); // Temperature ISR
337
     DISABLE_STEPPER_DRIVER_INTERRUPT();
337
     DISABLE_STEPPER_DRIVER_INTERRUPT();
338
-    #if !defined(CPU_32_BIT)
338
+    #ifndef CPU_32_BIT
339
       sei();
339
       sei();
340
     #endif
340
     #endif
341
   #endif
341
   #endif

+ 1
- 1
Marlin/src/pins/pins_ANET_10.h View File

88
  *   Many thanks to Hans Raaf (@oderwat) for developing the Anet-specific software and supporting the Anet community.
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
   #error "Oops!  Make sure you have 'Anet V1.0', 'Anet V1.0 (Optiboot)' or 'Sanguino' selected from the 'Tools -> Boards' menu."
92
   #error "Oops!  Make sure you have 'Anet V1.0', 'Anet V1.0 (Optiboot)' or 'Sanguino' selected from the 'Tools -> Boards' menu."
93
 #endif
93
 #endif
94
 
94
 

+ 24
- 29
Marlin/src/pins/pins_RAMPS_RE_ARM.h View File

66
 #define Y_MAX_PIN          15  //10k pullup to 3.3V, 1K series
66
 #define Y_MAX_PIN          15  //10k pullup to 3.3V, 1K series
67
 #define Z_MIN_PIN          18  //10k pullup to 3.3V, 1K series
67
 #define Z_MIN_PIN          18  //10k pullup to 3.3V, 1K series
68
 #define Z_MAX_PIN          19  //10k pullup to 3.3V, 1K series
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
     //#define SHIFT_EN            41  // J5-4 & AUX-4
267
     //#define SHIFT_EN            41  // J5-4 & AUX-4
268
   #endif
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
  #if ENABLED(VIKI2) || ENABLED(miniVIKI)
283
  #if ENABLED(VIKI2) || ENABLED(miniVIKI)
289
 //    #define LCD_SCREEN_ROT_180
284
 //    #define LCD_SCREEN_ROT_180
307
     #undef  LCD_PINS_D5         //59  // J3-8 & AUX-2
302
     #undef  LCD_PINS_D5         //59  // J3-8 & AUX-2
308
     #define DOGLCD_A0           59  // J3-8 & AUX-2
303
     #define DOGLCD_A0           59  // J3-8 & AUX-2
309
     #undef  LCD_PINS_D6         //63  // J5-3 & AUX-2
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
     #define DOGLCD_SCK SCK_PIN
306
     #define DOGLCD_SCK SCK_PIN
312
     #define DOGLCD_MOSI MOSI_PIN
307
     #define DOGLCD_MOSI MOSI_PIN
313
 
308
 
335
 // Ethernet pins
330
 // Ethernet pins
336
 //
331
 //
337
 #ifndef ULTIPANEL
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
 #endif
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
  *  PWMS
346
  *  PWMS

+ 5
- 5
frameworks/CMSIS/LPC1768/include/lpc_types.h View File

134
 
134
 
135
 /* NULL pointer */
135
 /* NULL pointer */
136
 #ifndef NULL
136
 #ifndef NULL
137
-#define NULL ((void*) 0)
137
+  #define NULL ((void*) 0)
138
 #endif
138
 #endif
139
 
139
 
140
 /* Number of elements in an array */
140
 /* Number of elements in an array */
145
 /* External data/function define */
145
 /* External data/function define */
146
 #define EXTERN extern
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
 #endif
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
 #endif
153
 #endif
154
 
154
 
155
 /**
155
 /**

Loading…
Cancel
Save