Browse Source

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

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

12
Marlin/Configuration_adv.h

@ -1691,6 +1691,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/default/Configuration_adv.h

@ -1691,6 +1691,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Anet/A2/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Anet/A6/Configuration_adv.h

@ -1689,6 +1689,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Anet/A8/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/ArmEd/Configuration_adv.h

@ -1664,6 +1664,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h

@ -1689,6 +1689,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

13
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h

@ -1697,6 +1697,19 @@
#ifdef G0_FEEDRATE #ifdef G0_FEEDRATE
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Cartesio/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h

@ -1693,6 +1693,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Einstart-S/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Felix/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h

@ -1692,6 +1692,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h

@ -1694,6 +1694,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h

@ -1695,6 +1695,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h

@ -1676,6 +1676,18 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/MakerParts/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Malyan/M200/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h

@ -1698,6 +1698,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/RigidBot/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/SCARA/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Sanguinololu/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/TheBorg/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/TinyBoy2/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h

@ -1703,6 +1703,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h

@ -1692,6 +1692,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h

@ -1692,6 +1692,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h

@ -1692,6 +1692,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h

@ -1692,6 +1692,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h

@ -1692,6 +1692,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h

@ -1665,6 +1665,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/delta/generic/Configuration_adv.h

@ -1692,6 +1692,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h

@ -1692,6 +1692,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h

@ -1692,6 +1692,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/makibox/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h

@ -1690,6 +1690,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

12
Marlin/src/config/examples/wt150/Configuration_adv.h

@ -1691,6 +1691,18 @@
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
#endif #endif
/**
* G-code Macros
*
* Add G-codes M810-M819 to define and run G-code macros.
* Macros are not saved to EEPROM.
*/
//#define GCODE_MACROS
#if ENABLED(GCODE_MACROS)
#define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
#define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
#endif
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

67
Marlin/src/gcode/feature/macro/M810-M819.cpp

@ -0,0 +1,67 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "../../../inc/MarlinConfig.h"
#if ENABLED(GCODE_MACROS)
#include "../../gcode.h"
#include "../../queue.h"
#include "../../parser.h"
char gcode_macros[GCODE_MACROS_SLOTS][GCODE_MACROS_SLOT_SIZE + 1] = {{ 0 }};
/**
* M810_819: Set/execute a G-code macro.
*
* Usage:
* M810 <command>|... Set Macro 0 to the given commands, separated by the pipe character
* M810 Execute Macro 0
*/
void GcodeSuite::M810_819() {
const uint8_t index = parser.codenum - 810;
if (index >= GCODE_MACROS_SLOTS) return;
const size_t len = strlen(parser.string_arg);
if (len) {
// Set a macro
if (len > GCODE_MACROS_SLOT_SIZE) {
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM("Macro too long.");
}
else {
char c, *s = parser.string_arg, *d = gcode_macros[index];
do {
c = *s++;
*d++ = c == '|' ? '\n' : c;
} while (c);
}
}
else {
// Execute a macro
char * const cmd = gcode_macros[index];
if (strlen(cmd)) process_subcommands_now(cmd);
}
}
#endif // GCODE_MACROS

6
Marlin/src/gcode/gcode.cpp

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

9
Marlin/src/gcode/gcode.h

@ -211,8 +211,9 @@
* M605 - Set Dual X-Carriage movement mode: "M605 S<mode> [X<x_offset>] [R<temp_offset>]". (Requires DUAL_X_CARRIAGE) * M605 - Set Dual X-Carriage movement mode: "M605 S<mode> [X<x_offset>] [R<temp_offset>]". (Requires DUAL_X_CARRIAGE)
* 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) * 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)
* M666 - Set/get offsets for delta (Requires DELTA) or dual endstops (Requires [XYZ]_DUAL_ENDSTOPS). * M666 - Set/get offsets for delta (Requires DELTA) or dual endstops (Requires [XYZ]_DUAL_ENDSTOPS).
* M701 - Load filament (requires FILAMENT_LOAD_UNLOAD_GCODES) * M701 - Load filament (Requires FILAMENT_LOAD_UNLOAD_GCODES)
* M702 - Unload filament (requires FILAMENT_LOAD_UNLOAD_GCODES) * M702 - Unload filament (Requires FILAMENT_LOAD_UNLOAD_GCODES)
* M810-M819 - Define/execute a G-code macro (Requires GCODE_MACROS)
* M851 - Set Z probe's Z offset in current units. (Negative = below the nozzle.) * M851 - Set Z probe's Z offset in current units. (Negative = below the nozzle.)
* M852 - Set skew factors: "M852 [I<xy>] [J<xz>] [K<yz>]". (Requires SKEW_CORRECTION_GCODE, and SKEW_CORRECTION_FOR_Z for IJ) * M852 - Set skew factors: "M852 [I<xy>] [J<xz>] [K<yz>]". (Requires SKEW_CORRECTION_GCODE, and SKEW_CORRECTION_FOR_Z for IJ)
* M860 - Report the position of position encoder modules. * M860 - Report the position of position encoder modules.
@ -760,6 +761,10 @@ private:
static void M7219(); static void M7219();
#endif #endif
#if ENABLED(GCODE_MACROS)
static void M810_819();
#endif
#if HAS_BED_PROBE #if HAS_BED_PROBE
static void M851(); static void M851();
#endif #endif

9
Marlin/src/gcode/parser.cpp

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

4
Marlin/src/gcode/queue.cpp

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

2
Marlin/src/inc/Conditionals_post.h

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

4
Marlin/src/inc/SanityCheck.h

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

1
buildroot/share/tests/teensy35_tests

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

Loading…
Cancel
Save