Kaynağa Gözat

[2.0.x] Macro G-codes (#9365)

revilor 5 yıl önce
ebeveyn
işleme
b60abc7c37
67 değiştirilmiş dosya ile 806 ekleme ve 5 silme
  1. 12
    0
      Marlin/Configuration_adv.h
  2. 12
    0
      Marlin/src/config/default/Configuration_adv.h
  3. 12
    0
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  4. 12
    0
      Marlin/src/config/examples/Anet/A2/Configuration_adv.h
  5. 12
    0
      Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h
  6. 12
    0
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  7. 12
    0
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  8. 12
    0
      Marlin/src/config/examples/ArmEd/Configuration_adv.h
  9. 12
    0
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
  10. 12
    0
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
  11. 12
    0
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  12. 13
    0
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  13. 12
    0
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  14. 12
    0
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  15. 12
    0
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  16. 12
    0
      Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
  17. 12
    0
      Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
  18. 12
    0
      Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
  19. 12
    0
      Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
  20. 12
    0
      Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
  21. 12
    0
      Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
  22. 12
    0
      Marlin/src/config/examples/Einstart-S/Configuration_adv.h
  23. 12
    0
      Marlin/src/config/examples/Felix/Configuration_adv.h
  24. 12
    0
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
  25. 12
    0
      Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h
  26. 12
    0
      Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h
  27. 12
    0
      Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h
  28. 12
    0
      Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h
  29. 12
    0
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
  30. 12
    0
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
  31. 12
    0
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  32. 12
    0
      Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
  33. 12
    0
      Marlin/src/config/examples/MakerParts/Configuration_adv.h
  34. 12
    0
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  35. 12
    0
      Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
  36. 12
    0
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
  37. 12
    0
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  38. 12
    0
      Marlin/src/config/examples/RigidBot/Configuration_adv.h
  39. 12
    0
      Marlin/src/config/examples/SCARA/Configuration_adv.h
  40. 12
    0
      Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
  41. 12
    0
      Marlin/src/config/examples/TheBorg/Configuration_adv.h
  42. 12
    0
      Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
  43. 12
    0
      Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h
  44. 12
    0
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
  45. 12
    0
      Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
  46. 12
    0
      Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
  47. 12
    0
      Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
  48. 12
    0
      Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h
  49. 12
    0
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
  50. 12
    0
      Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
  51. 12
    0
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
  52. 12
    0
      Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h
  53. 12
    0
      Marlin/src/config/examples/delta/generic/Configuration_adv.h
  54. 12
    0
      Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
  55. 12
    0
      Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
  56. 12
    0
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
  57. 12
    0
      Marlin/src/config/examples/makibox/Configuration_adv.h
  58. 12
    0
      Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
  59. 12
    0
      Marlin/src/config/examples/wt150/Configuration_adv.h
  60. 67
    0
      Marlin/src/gcode/feature/macro/M810-M819.cpp
  61. 6
    0
      Marlin/src/gcode/gcode.cpp
  62. 7
    2
      Marlin/src/gcode/gcode.h
  63. 8
    1
      Marlin/src/gcode/parser.cpp
  64. 3
    1
      Marlin/src/gcode/queue.cpp
  65. 1
    1
      Marlin/src/inc/Conditionals_post.h
  66. 4
    0
      Marlin/src/inc/SanityCheck.h
  67. 1
    0
      buildroot/share/tests/teensy35_tests

+ 12
- 0
Marlin/Configuration_adv.h Dosyayı Görüntüle

@@ -1692,6 +1692,18 @@
1692 1692
 #endif
1693 1693
 
1694 1694
 /**
1695
+ * G-code Macros
1696
+ *
1697
+ * Add G-codes M810-M819 to define and run G-code macros.
1698
+ * Macros are not saved to EEPROM.
1699
+ */
1700
+//#define GCODE_MACROS
1701
+#if ENABLED(GCODE_MACROS)
1702
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1703
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1704
+#endif
1705
+
1706
+/**
1695 1707
  * User-defined menu items that execute custom GCode
1696 1708
  */
1697 1709
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/default/Configuration_adv.h Dosyayı Görüntüle

@@ -1692,6 +1692,18 @@
1692 1692
 #endif
1693 1693
 
1694 1694
 /**
1695
+ * G-code Macros
1696
+ *
1697
+ * Add G-codes M810-M819 to define and run G-code macros.
1698
+ * Macros are not saved to EEPROM.
1699
+ */
1700
+//#define GCODE_MACROS
1701
+#if ENABLED(GCODE_MACROS)
1702
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1703
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1704
+#endif
1705
+
1706
+/**
1695 1707
  * User-defined menu items that execute custom GCode
1696 1708
  */
1697 1709
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Anet/A2/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Anet/A6/Configuration_adv.h Dosyayı Görüntüle

@@ -1690,6 +1690,18 @@
1690 1690
 #endif
1691 1691
 
1692 1692
 /**
1693
+ * G-code Macros
1694
+ *
1695
+ * Add G-codes M810-M819 to define and run G-code macros.
1696
+ * Macros are not saved to EEPROM.
1697
+ */
1698
+//#define GCODE_MACROS
1699
+#if ENABLED(GCODE_MACROS)
1700
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1701
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1702
+#endif
1703
+
1704
+/**
1693 1705
  * User-defined menu items that execute custom GCode
1694 1706
  */
1695 1707
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Anet/A8/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/ArmEd/Configuration_adv.h Dosyayı Görüntüle

@@ -1665,6 +1665,18 @@
1665 1665
 #endif
1666 1666
 
1667 1667
 /**
1668
+ * G-code Macros
1669
+ *
1670
+ * Add G-codes M810-M819 to define and run G-code macros.
1671
+ * Macros are not saved to EEPROM.
1672
+ */
1673
+//#define GCODE_MACROS
1674
+#if ENABLED(GCODE_MACROS)
1675
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1676
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1677
+#endif
1678
+
1679
+/**
1668 1680
  * User-defined menu items that execute custom GCode
1669 1681
  */
1670 1682
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h Dosyayı Görüntüle

@@ -1690,6 +1690,18 @@
1690 1690
 #endif
1691 1691
 
1692 1692
 /**
1693
+ * G-code Macros
1694
+ *
1695
+ * Add G-codes M810-M819 to define and run G-code macros.
1696
+ * Macros are not saved to EEPROM.
1697
+ */
1698
+//#define GCODE_MACROS
1699
+#if ENABLED(GCODE_MACROS)
1700
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1701
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1702
+#endif
1703
+
1704
+/**
1693 1705
  * User-defined menu items that execute custom GCode
1694 1706
  */
1695 1707
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 13
- 0
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h Dosyayı Görüntüle

@@ -1697,6 +1697,19 @@
1697 1697
 #ifdef G0_FEEDRATE
1698 1698
   //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
1699 1699
 #endif
1700
+
1701
+/**
1702
+ * G-code Macros
1703
+ *
1704
+ * Add G-codes M810-M819 to define and run G-code macros.
1705
+ * Macros are not saved to EEPROM.
1706
+ */
1707
+//#define GCODE_MACROS
1708
+#if ENABLED(GCODE_MACROS)
1709
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1710
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1711
+#endif
1712
+
1700 1713
 /**
1701 1714
  * User-defined menu items that execute custom GCode
1702 1715
  */

+ 12
- 0
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Cartesio/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h Dosyayı Görüntüle

@@ -1694,6 +1694,18 @@
1694 1694
 #endif
1695 1695
 
1696 1696
 /**
1697
+ * G-code Macros
1698
+ *
1699
+ * Add G-codes M810-M819 to define and run G-code macros.
1700
+ * Macros are not saved to EEPROM.
1701
+ */
1702
+//#define GCODE_MACROS
1703
+#if ENABLED(GCODE_MACROS)
1704
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1705
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1706
+#endif
1707
+
1708
+/**
1697 1709
  * User-defined menu items that execute custom GCode
1698 1710
  */
1699 1711
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Einstart-S/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Felix/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h Dosyayı Görüntüle

@@ -1693,6 +1693,18 @@
1693 1693
 #endif
1694 1694
 
1695 1695
 /**
1696
+ * G-code Macros
1697
+ *
1698
+ * Add G-codes M810-M819 to define and run G-code macros.
1699
+ * Macros are not saved to EEPROM.
1700
+ */
1701
+//#define GCODE_MACROS
1702
+#if ENABLED(GCODE_MACROS)
1703
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1704
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1705
+#endif
1706
+
1707
+/**
1696 1708
  * User-defined menu items that execute custom GCode
1697 1709
  */
1698 1710
 #if ENABLED(UBL)

+ 12
- 0
Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h Dosyayı Görüntüle

@@ -1695,6 +1695,18 @@
1695 1695
 #endif
1696 1696
 
1697 1697
 /**
1698
+ * G-code Macros
1699
+ *
1700
+ * Add G-codes M810-M819 to define and run G-code macros.
1701
+ * Macros are not saved to EEPROM.
1702
+ */
1703
+//#define GCODE_MACROS
1704
+#if ENABLED(GCODE_MACROS)
1705
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1706
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1707
+#endif
1708
+
1709
+/**
1698 1710
  * User-defined menu items that execute custom GCode
1699 1711
  */
1700 1712
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h Dosyayı Görüntüle

@@ -1696,6 +1696,18 @@
1696 1696
 #endif
1697 1697
 
1698 1698
 /**
1699
+ * G-code Macros
1700
+ *
1701
+ * Add G-codes M810-M819 to define and run G-code macros.
1702
+ * Macros are not saved to EEPROM.
1703
+ */
1704
+//#define GCODE_MACROS
1705
+#if ENABLED(GCODE_MACROS)
1706
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1707
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1708
+#endif
1709
+
1710
+/**
1699 1711
  * User-defined menu items that execute custom GCode
1700 1712
  */
1701 1713
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h Dosyayı Görüntüle

@@ -1677,6 +1677,18 @@
1677 1677
 #define FASTER_GCODE_PARSER
1678 1678
 
1679 1679
 /**
1680
+ * G-code Macros
1681
+ *
1682
+ * Add G-codes M810-M819 to define and run G-code macros.
1683
+ * Macros are not saved to EEPROM.
1684
+ */
1685
+//#define GCODE_MACROS
1686
+#if ENABLED(GCODE_MACROS)
1687
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1688
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1689
+#endif
1690
+
1691
+/**
1680 1692
  * User-defined menu items that execute custom GCode
1681 1693
  */
1682 1694
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/MakerParts/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Malyan/M200/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h Dosyayı Görüntüle

@@ -1699,6 +1699,18 @@
1699 1699
 #endif
1700 1700
 
1701 1701
 /**
1702
+ * G-code Macros
1703
+ *
1704
+ * Add G-codes M810-M819 to define and run G-code macros.
1705
+ * Macros are not saved to EEPROM.
1706
+ */
1707
+//#define GCODE_MACROS
1708
+#if ENABLED(GCODE_MACROS)
1709
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1710
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1711
+#endif
1712
+
1713
+/**
1702 1714
  * User-defined menu items that execute custom GCode
1703 1715
  */
1704 1716
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/RigidBot/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/SCARA/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Sanguinololu/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/TheBorg/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/TinyBoy2/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h Dosyayı Görüntüle

@@ -1704,6 +1704,18 @@
1704 1704
 #endif
1705 1705
 
1706 1706
 /**
1707
+ * G-code Macros
1708
+ *
1709
+ * Add G-codes M810-M819 to define and run G-code macros.
1710
+ * Macros are not saved to EEPROM.
1711
+ */
1712
+//#define GCODE_MACROS
1713
+#if ENABLED(GCODE_MACROS)
1714
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1715
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1716
+#endif
1717
+
1718
+/**
1707 1719
  * User-defined menu items that execute custom GCode
1708 1720
  */
1709 1721
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h Dosyayı Görüntüle

@@ -1693,6 +1693,18 @@
1693 1693
 #endif
1694 1694
 
1695 1695
 /**
1696
+ * G-code Macros
1697
+ *
1698
+ * Add G-codes M810-M819 to define and run G-code macros.
1699
+ * Macros are not saved to EEPROM.
1700
+ */
1701
+//#define GCODE_MACROS
1702
+#if ENABLED(GCODE_MACROS)
1703
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1704
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1705
+#endif
1706
+
1707
+/**
1696 1708
  * User-defined menu items that execute custom GCode
1697 1709
  */
1698 1710
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h Dosyayı Görüntüle

@@ -1693,6 +1693,18 @@
1693 1693
 #endif
1694 1694
 
1695 1695
 /**
1696
+ * G-code Macros
1697
+ *
1698
+ * Add G-codes M810-M819 to define and run G-code macros.
1699
+ * Macros are not saved to EEPROM.
1700
+ */
1701
+//#define GCODE_MACROS
1702
+#if ENABLED(GCODE_MACROS)
1703
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1704
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1705
+#endif
1706
+
1707
+/**
1696 1708
  * User-defined menu items that execute custom GCode
1697 1709
  */
1698 1710
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h Dosyayı Görüntüle

@@ -1693,6 +1693,18 @@
1693 1693
 #endif
1694 1694
 
1695 1695
 /**
1696
+ * G-code Macros
1697
+ *
1698
+ * Add G-codes M810-M819 to define and run G-code macros.
1699
+ * Macros are not saved to EEPROM.
1700
+ */
1701
+//#define GCODE_MACROS
1702
+#if ENABLED(GCODE_MACROS)
1703
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1704
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1705
+#endif
1706
+
1707
+/**
1696 1708
  * User-defined menu items that execute custom GCode
1697 1709
  */
1698 1710
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h Dosyayı Görüntüle

@@ -1693,6 +1693,18 @@
1693 1693
 #endif
1694 1694
 
1695 1695
 /**
1696
+ * G-code Macros
1697
+ *
1698
+ * Add G-codes M810-M819 to define and run G-code macros.
1699
+ * Macros are not saved to EEPROM.
1700
+ */
1701
+//#define GCODE_MACROS
1702
+#if ENABLED(GCODE_MACROS)
1703
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1704
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1705
+#endif
1706
+
1707
+/**
1696 1708
  * User-defined menu items that execute custom GCode
1697 1709
  */
1698 1710
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h Dosyayı Görüntüle

@@ -1693,6 +1693,18 @@
1693 1693
 #endif
1694 1694
 
1695 1695
 /**
1696
+ * G-code Macros
1697
+ *
1698
+ * Add G-codes M810-M819 to define and run G-code macros.
1699
+ * Macros are not saved to EEPROM.
1700
+ */
1701
+//#define GCODE_MACROS
1702
+#if ENABLED(GCODE_MACROS)
1703
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1704
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1705
+#endif
1706
+
1707
+/**
1696 1708
  * User-defined menu items that execute custom GCode
1697 1709
  */
1698 1710
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h Dosyayı Görüntüle

@@ -1666,6 +1666,18 @@
1666 1666
 #endif
1667 1667
 
1668 1668
 /**
1669
+ * G-code Macros
1670
+ *
1671
+ * Add G-codes M810-M819 to define and run G-code macros.
1672
+ * Macros are not saved to EEPROM.
1673
+ */
1674
+//#define GCODE_MACROS
1675
+#if ENABLED(GCODE_MACROS)
1676
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1677
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1678
+#endif
1679
+
1680
+/**
1669 1681
  * User-defined menu items that execute custom GCode
1670 1682
  */
1671 1683
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/delta/generic/Configuration_adv.h Dosyayı Görüntüle

@@ -1693,6 +1693,18 @@
1693 1693
 #endif
1694 1694
 
1695 1695
 /**
1696
+ * G-code Macros
1697
+ *
1698
+ * Add G-codes M810-M819 to define and run G-code macros.
1699
+ * Macros are not saved to EEPROM.
1700
+ */
1701
+//#define GCODE_MACROS
1702
+#if ENABLED(GCODE_MACROS)
1703
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1704
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1705
+#endif
1706
+
1707
+/**
1696 1708
  * User-defined menu items that execute custom GCode
1697 1709
  */
1698 1710
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h Dosyayı Görüntüle

@@ -1693,6 +1693,18 @@
1693 1693
 #endif
1694 1694
 
1695 1695
 /**
1696
+ * G-code Macros
1697
+ *
1698
+ * Add G-codes M810-M819 to define and run G-code macros.
1699
+ * Macros are not saved to EEPROM.
1700
+ */
1701
+//#define GCODE_MACROS
1702
+#if ENABLED(GCODE_MACROS)
1703
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1704
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1705
+#endif
1706
+
1707
+/**
1696 1708
  * User-defined menu items that execute custom GCode
1697 1709
  */
1698 1710
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h Dosyayı Görüntüle

@@ -1693,6 +1693,18 @@
1693 1693
 #endif
1694 1694
 
1695 1695
 /**
1696
+ * G-code Macros
1697
+ *
1698
+ * Add G-codes M810-M819 to define and run G-code macros.
1699
+ * Macros are not saved to EEPROM.
1700
+ */
1701
+//#define GCODE_MACROS
1702
+#if ENABLED(GCODE_MACROS)
1703
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1704
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1705
+#endif
1706
+
1707
+/**
1696 1708
  * User-defined menu items that execute custom GCode
1697 1709
  */
1698 1710
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/makibox/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h Dosyayı Görüntüle

@@ -1691,6 +1691,18 @@
1691 1691
 #endif
1692 1692
 
1693 1693
 /**
1694
+ * G-code Macros
1695
+ *
1696
+ * Add G-codes M810-M819 to define and run G-code macros.
1697
+ * Macros are not saved to EEPROM.
1698
+ */
1699
+//#define GCODE_MACROS
1700
+#if ENABLED(GCODE_MACROS)
1701
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1702
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1703
+#endif
1704
+
1705
+/**
1694 1706
  * User-defined menu items that execute custom GCode
1695 1707
  */
1696 1708
 //#define CUSTOM_USER_MENUS

+ 12
- 0
Marlin/src/config/examples/wt150/Configuration_adv.h Dosyayı Görüntüle

@@ -1692,6 +1692,18 @@
1692 1692
 #endif
1693 1693
 
1694 1694
 /**
1695
+ * G-code Macros
1696
+ *
1697
+ * Add G-codes M810-M819 to define and run G-code macros.
1698
+ * Macros are not saved to EEPROM.
1699
+ */
1700
+//#define GCODE_MACROS
1701
+#if ENABLED(GCODE_MACROS)
1702
+  #define GCODE_MACROS_SLOTS       5  // Up to 10 may be used
1703
+  #define GCODE_MACROS_SLOT_SIZE  50  // Maximum length of a single macro
1704
+#endif
1705
+
1706
+/**
1695 1707
  * User-defined menu items that execute custom GCode
1696 1708
  */
1697 1709
 //#define CUSTOM_USER_MENUS

+ 67
- 0
Marlin/src/gcode/feature/macro/M810-M819.cpp Dosyayı Görüntüle

@@ -0,0 +1,67 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+#include "../../../inc/MarlinConfig.h"
24
+
25
+#if ENABLED(GCODE_MACROS)
26
+
27
+#include "../../gcode.h"
28
+#include "../../queue.h"
29
+#include "../../parser.h"
30
+
31
+char gcode_macros[GCODE_MACROS_SLOTS][GCODE_MACROS_SLOT_SIZE + 1] = {{ 0 }};
32
+
33
+/**
34
+ * M810_819: Set/execute a G-code macro.
35
+ *
36
+ * Usage:
37
+ *   M810 <command>|...   Set Macro 0 to the given commands, separated by the pipe character
38
+ *   M810                 Execute Macro 0
39
+ */
40
+void GcodeSuite::M810_819() {
41
+  const uint8_t index = parser.codenum - 810;
42
+  if (index >= GCODE_MACROS_SLOTS) return;
43
+
44
+  const size_t len = strlen(parser.string_arg);
45
+
46
+  if (len) {
47
+    // Set a macro
48
+    if (len > GCODE_MACROS_SLOT_SIZE) {
49
+      SERIAL_ERROR_START();
50
+      SERIAL_ERRORLNPGM("Macro too long.");
51
+    }
52
+    else {
53
+      char c, *s = parser.string_arg, *d = gcode_macros[index];
54
+      do {
55
+        c = *s++;
56
+        *d++ = c == '|' ? '\n' : c;
57
+      } while (c);
58
+    }
59
+  }
60
+  else {
61
+    // Execute a macro
62
+    char * const cmd = gcode_macros[index];
63
+    if (strlen(cmd)) process_subcommands_now(cmd);
64
+  }
65
+}
66
+
67
+#endif // GCODE_MACROS

+ 6
- 0
Marlin/src/gcode/gcode.cpp Dosyayı Görüntüle

@@ -624,6 +624,12 @@ void GcodeSuite::process_parsed_command(
624 624
         case 7219: M7219(); break;                                // M7219: Set LEDs, columns, and rows
625 625
       #endif
626 626
 
627
+      #if ENABLED(GCODE_MACROS)
628
+        case 810: case 811: case 812: case 813: case 814:
629
+        case 815: case 816: case 817: case 818: case 819:
630
+        M810_819(); break;                                        // M810-M819: Define/execute G-code macro
631
+      #endif
632
+
627 633
       #if ENABLED(LIN_ADVANCE)
628 634
         case 900: M900(); break;                                  // M900: Set advance K factor.
629 635
       #endif

+ 7
- 2
Marlin/src/gcode/gcode.h Dosyayı Görüntüle

@@ -211,8 +211,9 @@
211 211
  * M605 - Set Dual X-Carriage movement mode: "M605 S<mode> [X<x_offset>] [R<temp_offset>]". (Requires DUAL_X_CARRIAGE)
212 212
  * M665 - Set delta configurations: "M665 H<delta height> L<diagonal rod> R<delta radius> S<segments/s> B<calibration radius> X<Alpha angle trim> Y<Beta angle trim> Z<Gamma angle trim> (Requires DELTA)
213 213
  * M666 - Set/get offsets for delta (Requires DELTA) or dual endstops (Requires [XYZ]_DUAL_ENDSTOPS).
214
- * M701 - Load filament (requires FILAMENT_LOAD_UNLOAD_GCODES)
215
- * M702 - Unload filament (requires FILAMENT_LOAD_UNLOAD_GCODES)
214
+ * M701 - Load filament (Requires FILAMENT_LOAD_UNLOAD_GCODES)
215
+ * M702 - Unload filament (Requires FILAMENT_LOAD_UNLOAD_GCODES)
216
+ * M810-M819 - Define/execute a G-code macro (Requires GCODE_MACROS)
216 217
  * M851 - Set Z probe's Z offset in current units. (Negative = below the nozzle.)
217 218
  * M852 - Set skew factors: "M852 [I<xy>] [J<xz>] [K<yz>]". (Requires SKEW_CORRECTION_GCODE, and SKEW_CORRECTION_FOR_Z for IJ)
218 219
  * M860 - Report the position of position encoder modules.
@@ -760,6 +761,10 @@ private:
760 761
     static void M7219();
761 762
   #endif
762 763
 
764
+  #if ENABLED(GCODE_MACROS)
765
+    static void M810_819();
766
+  #endif
767
+
763 768
   #if HAS_BED_PROBE
764 769
     static void M851();
765 770
   #endif

+ 8
- 1
Marlin/src/gcode/parser.cpp Dosyayı Görüntüle

@@ -209,7 +209,14 @@ void GCodeParser::parse(char *p) {
209 209
   #endif
210 210
 
211 211
   // Only use string_arg for these M codes
212
-  if (letter == 'M') switch (codenum) { case 23: case 28: case 30: case 117: case 118: case 928: string_arg = p; return; default: break; }
212
+  if (letter == 'M') switch (codenum) {
213
+    #if ENABLED(GCODE_MACROS)
214
+      case 810: case 811: case 812: case 813: case 814:
215
+      case 815: case 816: case 817: case 818: case 819:
216
+    #endif
217
+    case 23: case 28: case 30: case 117: case 118: case 928: string_arg = p; return;
218
+    default: break;
219
+  }
213 220
 
214 221
   #if ENABLED(DEBUG_GCODE_PARSER)
215 222
     const bool debug = codenum == 800;

+ 3
- 1
Marlin/src/gcode/queue.cpp Dosyayı Görüntüle

@@ -188,7 +188,8 @@ void enqueue_and_echo_commands_P(PGM_P const pgcode) {
188 188
 
189 189
 #if HAS_QUEUE_NOW
190 190
   /**
191
-   * Enqueue and return only when commands are actually enqueued
191
+   * Enqueue and return only when commands are actually enqueued.
192
+   * Never call this from a G-code handler!
192 193
    */
193 194
   void enqueue_and_echo_command_now(const char* cmd) {
194 195
     while (!enqueue_and_echo_command(cmd)) idle();
@@ -196,6 +197,7 @@ void enqueue_and_echo_commands_P(PGM_P const pgcode) {
196 197
   #if HAS_LCD_QUEUE_NOW
197 198
     /**
198 199
      * Enqueue from program memory and return only when commands are actually enqueued
200
+     * Never call this from a G-code handler!
199 201
      */
200 202
     void enqueue_and_echo_commands_now_P(PGM_P const pgcode) {
201 203
       enqueue_and_echo_commands_P(pgcode);

+ 1
- 1
Marlin/src/inc/Conditionals_post.h Dosyayı Görüntüle

@@ -1619,7 +1619,7 @@
1619 1619
 // If platform requires early initialization of watchdog to properly boot
1620 1620
 #define EARLY_WATCHDOG (ENABLED(USE_WATCHDOG) && defined(ARDUINO_ARCH_SAM))
1621 1621
 
1622
-#define USE_EXECUTE_COMMANDS_IMMEDIATE ENABLED(G29_RETRY_AND_RECOVER)
1622
+#define USE_EXECUTE_COMMANDS_IMMEDIATE (ENABLED(G29_RETRY_AND_RECOVER) || ENABLED(GCODE_MACROS))
1623 1623
 
1624 1624
 #if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
1625 1625
   #define Z_STEPPER_COUNT 3

+ 4
- 0
Marlin/src/inc/SanityCheck.h Dosyayı Görüntüle

@@ -1962,3 +1962,7 @@ static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too m
1962 1962
 #if ENABLED(SD_FIRMWARE_UPDATE) && !defined(__AVR_ATmega2560__)
1963 1963
   #error "SD_FIRMWARE_UPDATE requires an ATmega2560-based (Arduino Mega) board."
1964 1964
 #endif
1965
+
1966
+#if ENABLED(GCODE_MACROS) && !WITHIN(GCODE_MACROS_SLOTS, 1, 10)
1967
+  #error "GCODE_MACROS_SLOTS must be a number from 1 to 10."
1968
+#endif

+ 1
- 0
buildroot/share/tests/teensy35_tests Dosyayı Görüntüle

@@ -35,6 +35,7 @@ exec_test $1 $2 "Teensy3.5 with many features"
35 35
 restore_configs
36 36
 opt_enable EEPROM_SETTINGS \
37 37
            Z_PROBE_SLED AUTO_BED_LEVELING_LINEAR DEBUG_LEVELING_FEATURE
38
+opt_enable_adv GCODE_MACROS
38 39
 exec_test $1 $2 "Sled Z Probe with Linear leveling"
39 40
 
40 41
 #

Loading…
İptal
Kaydet