瀏覽代碼

Add HOST_PROMPT_SUPPORT (#13039)

InsanityAutomation 5 年之前
父節點
當前提交
7f1b69b0c8
共有 100 個文件被更改,包括 819 次插入1951 次删除
  1. 2
    12
      Marlin/Configuration.h
  2. 14
    29
      Marlin/Configuration_adv.h
  3. 0
    2
      Marlin/src/HAL/HAL_LPC1768/MarlinSerial.h
  4. 92
    27
      Marlin/src/Marlin.cpp
  5. 7
    22
      Marlin/src/Marlin.h
  6. 2
    12
      Marlin/src/config/default/Configuration.h
  7. 14
    29
      Marlin/src/config/default/Configuration_adv.h
  8. 2
    12
      Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration.h
  9. 14
    29
      Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration_adv.h
  10. 2
    12
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
  11. 14
    29
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  12. 2
    12
      Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
  13. 2
    12
      Marlin/src/config/examples/Anet/A2/Configuration.h
  14. 14
    29
      Marlin/src/config/examples/Anet/A2/Configuration_adv.h
  15. 2
    12
      Marlin/src/config/examples/Anet/A2plus/Configuration.h
  16. 14
    29
      Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h
  17. 2
    12
      Marlin/src/config/examples/Anet/A6/Configuration.h
  18. 14
    29
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  19. 2
    12
      Marlin/src/config/examples/Anet/A8/Configuration.h
  20. 14
    29
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  21. 2
    12
      Marlin/src/config/examples/AnyCubic/i3/Configuration.h
  22. 14
    29
      Marlin/src/config/examples/AnyCubic/i3/Configuration_adv.h
  23. 2
    12
      Marlin/src/config/examples/ArmEd/Configuration.h
  24. 14
    29
      Marlin/src/config/examples/ArmEd/Configuration_adv.h
  25. 2
    12
      Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
  26. 2
    12
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h
  27. 14
    29
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
  28. 2
    12
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h
  29. 14
    29
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
  30. 2
    12
      Marlin/src/config/examples/BQ/Hephestos/Configuration.h
  31. 14
    29
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  32. 2
    12
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
  33. 14
    29
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  34. 2
    12
      Marlin/src/config/examples/BQ/WITBOX/Configuration.h
  35. 14
    29
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  36. 2
    12
      Marlin/src/config/examples/Cartesio/Configuration.h
  37. 14
    29
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  38. 2
    12
      Marlin/src/config/examples/Creality/CR-10/Configuration.h
  39. 14
    29
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  40. 2
    12
      Marlin/src/config/examples/Creality/CR-10S/Configuration.h
  41. 14
    29
      Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
  42. 2
    12
      Marlin/src/config/examples/Creality/CR-10mini/Configuration.h
  43. 14
    29
      Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
  44. 2
    12
      Marlin/src/config/examples/Creality/CR-8/Configuration.h
  45. 14
    29
      Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
  46. 2
    12
      Marlin/src/config/examples/Creality/Ender-2/Configuration.h
  47. 14
    29
      Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
  48. 2
    12
      Marlin/src/config/examples/Creality/Ender-3/Configuration.h
  49. 14
    29
      Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
  50. 2
    12
      Marlin/src/config/examples/Creality/Ender-4/Configuration.h
  51. 14
    29
      Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
  52. 2
    12
      Marlin/src/config/examples/Einstart-S/Configuration.h
  53. 14
    29
      Marlin/src/config/examples/Einstart-S/Configuration_adv.h
  54. 2
    12
      Marlin/src/config/examples/Felix/Configuration.h
  55. 14
    29
      Marlin/src/config/examples/Felix/Configuration_adv.h
  56. 2
    12
      Marlin/src/config/examples/Felix/DUAL/Configuration.h
  57. 2
    12
      Marlin/src/config/examples/FlashForge/CreatorPro/Configuration.h
  58. 14
    29
      Marlin/src/config/examples/FlashForge/CreatorPro/Configuration_adv.h
  59. 2
    12
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
  60. 14
    29
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
  61. 2
    12
      Marlin/src/config/examples/Formbot/Raptor/Configuration.h
  62. 14
    29
      Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h
  63. 2
    12
      Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h
  64. 14
    29
      Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h
  65. 2
    12
      Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h
  66. 14
    29
      Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h
  67. 2
    12
      Marlin/src/config/examples/Geeetech/A10M/Configuration.h
  68. 14
    29
      Marlin/src/config/examples/Geeetech/A10M/Configuration_adv.h
  69. 2
    12
      Marlin/src/config/examples/Geeetech/A20M/Configuration.h
  70. 14
    29
      Marlin/src/config/examples/Geeetech/A20M/Configuration_adv.h
  71. 2
    12
      Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
  72. 2
    12
      Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
  73. 2
    12
      Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h
  74. 14
    29
      Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h
  75. 2
    12
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h
  76. 2
    12
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h
  77. 2
    12
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h
  78. 14
    29
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
  79. 2
    12
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h
  80. 14
    29
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
  81. 2
    12
      Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
  82. 14
    29
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  83. 2
    12
      Marlin/src/config/examples/JGAurora/A5/Configuration.h
  84. 14
    29
      Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
  85. 2
    12
      Marlin/src/config/examples/MakerParts/Configuration.h
  86. 14
    29
      Marlin/src/config/examples/MakerParts/Configuration_adv.h
  87. 2
    12
      Marlin/src/config/examples/Malyan/M150/Configuration.h
  88. 14
    29
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  89. 2
    12
      Marlin/src/config/examples/Malyan/M200/Configuration.h
  90. 14
    29
      Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
  91. 2
    12
      Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
  92. 2
    12
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
  93. 14
    29
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
  94. 2
    12
      Marlin/src/config/examples/Mks/Robin/Configuration.h
  95. 14
    29
      Marlin/src/config/examples/Mks/Robin/Configuration_adv.h
  96. 2
    12
      Marlin/src/config/examples/Mks/Sbase/Configuration.h
  97. 14
    29
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  98. 2
    12
      Marlin/src/config/examples/RapideLite/RL200/Configuration.h
  99. 14
    29
      Marlin/src/config/examples/RapideLite/RL200/Configuration_adv.h
  100. 0
    0
      Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h

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

@@ -1033,20 +1033,10 @@
1033 1033
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1034 1034
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1035 1035
 
1036
-  // Set one or more commands to run on filament runout.
1037
-  //  - Always applies to SD-card printing.
1038
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1036
+  // Set one or more commands to execute on filament runout.
1037
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1039 1038
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1040 1039
 
1041
-  // With this option, if filament runs out during host-based printing, Marlin
1042
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1043
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1044
-  // will be used on filament runout for both host-based and SD-card printing.
1045
-  //
1046
-  // The host must be able to respond to the //action: command set here.
1047
-  //
1048
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1049
-
1050 1040
   // After a runout is detected, continue printing this length of filament
1051 1041
   // before executing the runout script. Useful for a sensor at the end of
1052 1042
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/Configuration_adv.h 查看文件

@@ -1007,13 +1007,7 @@
1007 1007
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1008 1008
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1009 1009
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1010
-  /**
1011
-   * Specify an action command to send to the host on a recovery attempt or failure.
1012
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1013
-   * The host must be configured to handle the action command.
1014
-   */
1015
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1016
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1010
+
1017 1011
 #endif
1018 1012
 
1019 1013
 // @section extras
@@ -2014,32 +2008,23 @@
2014 2008
 #endif
2015 2009
 
2016 2010
 /**
2017
- * Specify an action command to send to the host when the printer is killed.
2018
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2019
- * The host must be configured to handle the action command.
2020
- */
2021
-//#define ACTION_ON_KILL "poweroff"
2022
-
2023
-/**
2024
- * Specify an action command to send to the host on pause and resume.
2025
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2026
- * The host must be configured to handle the action command.
2011
+ * Host Action Commands
2027 2012
  *
2028
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2029
- *                    action while Marlin continues to process G-Code. (M24/M25)
2013
+ * Define host streamer action commands in compliance with the standard.
2030 2014
  *
2031
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2032
- *                    change actions and the host needs to stop sending commands
2033
- *                    until the machine is ready to resume. (M125/M600)
2015
+ * See https://reprap.org/wiki/G-code#Action_commands
2016
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2017
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2034 2018
  *
2035
- *           CANCEL : Instructs the host to abort the print job. Used when the
2036
- *                    print is canceled from the LCD menu.
2019
+ * Some features add reason codes to extend these commands.
2020
+ *
2021
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2022
+ * filament runout and other processes can be managed from the host side.
2037 2023
  */
2038
-//#define ACTION_ON_PAUSE   "pause"
2039
-//#define ACTION_ON_RESUME  "resume"
2040
-//#define ACTION_ON_PAUSED  "paused"
2041
-//#define ACTION_ON_RESUMED "resumed"
2042
-//#define ACTION_ON_CANCEL  "cancel"
2024
+//#define HOST_ACTION_COMMANDS
2025
+#if ENABLED(HOST_ACTION_COMMANDS)
2026
+  //#define HOST_PROMPT_SUPPORT
2027
+#endif
2043 2028
 
2044 2029
 //===========================================================================
2045 2030
 //====================== I2C Position Encoder Settings ======================

+ 0
- 2
Marlin/src/HAL/HAL_LPC1768/MarlinSerial.h 查看文件

@@ -54,9 +54,7 @@ public:
54 54
       emergency_parser.update(emergency_state, c);
55 55
       return true; // do not discard character
56 56
     }
57
-  #endif
58 57
 
59
-  #if ENABLED(EMERGENCY_PARSER)
60 58
     EmergencyParser::State emergency_state;
61 59
   #endif
62 60
 };

+ 92
- 27
Marlin/src/Marlin.cpp 查看文件

@@ -56,6 +56,10 @@
56 56
 #include "gcode/parser.h"
57 57
 #include "gcode/queue.h"
58 58
 
59
+#if ENABLED(HOST_ACTION_COMMANDS)
60
+  #include "feature/host_actions.h"
61
+#endif
62
+
59 63
 #if HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER)
60 64
   #include "libs/buzzer.h"
61 65
 #endif
@@ -315,37 +319,98 @@ void disable_all_steppers() {
315 319
   disable_e_steppers();
316 320
 }
317 321
 
318
-#if HAS_ACTION_COMMANDS
322
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
323
+
324
+  void event_filament_runout() {
325
+
326
+    #if ENABLED(ADVANCED_PAUSE_FEATURE)
327
+      if (did_pause_print) return;  // Action already in progress. Purge triggered repeated runout.
328
+    #endif
329
+
330
+    #if ENABLED(EXTENSIBLE_UI)
331
+      ExtUI::onFilamentRunout(ExtUI::getActiveTool());
332
+    #endif
333
+
334
+    const char tool = '0'
335
+      #if NUM_RUNOUT_SENSORS > 1
336
+        + active_extruder
337
+      #endif
338
+    ;
339
+
340
+    //action:out_of_filament
341
+    #if ENABLED(HOST_PROMPT_SUPPORT)
342
+      host_prompt_reason = PROMPT_FILAMENT_RUNOUT;
343
+      host_action_prompt_end();
344
+      host_action_prompt_begin(PSTR("FilamentRunout T"), false);
345
+      SERIAL_CHAR(tool);
346
+      SERIAL_EOL();
347
+      host_action_prompt_show();
348
+    #endif
349
+
350
+    #if ENABLED(HOST_ACTION_COMMANDS)
351
+      if (!runout.host_handling
352
+        && ( strstr(FILAMENT_RUNOUT_SCRIPT, "M600")
353
+          || strstr(FILAMENT_RUNOUT_SCRIPT, "M125")
354
+          #if ENABLED(ADVANCED_PAUSE_FEATURE)
355
+            || strstr(FILAMENT_RUNOUT_SCRIPT, "M25")
356
+          #endif
357
+        )
358
+      ) {
359
+        host_action_paused(false);
360
+      }
361
+      else {
362
+        // Legacy Repetier command for use until newer version supports standard dialog
363
+        // To be removed later when pause command also triggers dialog
364
+        #ifdef ACTION_ON_FILAMENT_RUNOUT
365
+          host_action(PSTR(ACTION_ON_FILAMENT_RUNOUT " T"), false);
366
+          SERIAL_CHAR(tool);
367
+          SERIAL_EOL();
368
+        #endif
369
+
370
+        host_action_pause(false);
371
+      }
372
+      SERIAL_ECHOPGM(" " ACTION_REASON_ON_FILAMENT_RUNOUT " ");
373
+      SERIAL_CHAR(tool);
374
+      SERIAL_EOL();
319 375
 
320
-  void host_action(const char * const pstr, const bool eol=true) {
321
-    SERIAL_ECHOPGM("//action:");
322
-    serialprintPGM(pstr);
323
-    if (eol) SERIAL_EOL();
376
+    #endif // HOST_ACTION_COMMANDS
377
+
378
+    if (!runout.host_handling)
379
+      enqueue_and_echo_commands_P(PSTR(FILAMENT_RUNOUT_SCRIPT));
324 380
   }
325 381
 
326
-  #ifdef ACTION_ON_KILL
327
-    void host_action_kill() { host_action(PSTR(ACTION_ON_KILL)); }
328
-  #endif
329
-  #ifdef ACTION_ON_PAUSE
330
-    void host_action_pause() { host_action(PSTR(ACTION_ON_PAUSE)); }
331
-  #endif
332
-  #ifdef ACTION_ON_PAUSED
333
-    void host_action_paused() { host_action(PSTR(ACTION_ON_PAUSED)); }
334
-  #endif
335
-  #ifdef ACTION_ON_RESUME
336
-    void host_action_resume() { host_action(PSTR(ACTION_ON_RESUME)); }
337
-  #endif
338
-  #ifdef ACTION_ON_RESUMED
339
-    void host_action_resumed() { host_action(PSTR(ACTION_ON_RESUMED)); }
340
-  #endif
341
-  #ifdef ACTION_ON_CANCEL
342
-    void host_action_cancel() { host_action(PSTR(ACTION_ON_CANCEL)); }
343
-  #endif
344
-  #ifdef ACTION_ON_FILAMENT_RUNOUT
345
-    void host_action_filament_runout(const bool eol/*=true*/) { host_action(PSTR(ACTION_ON_FILAMENT_RUNOUT), eol); }
346
-  #endif
382
+#endif // FILAMENT_RUNOUT_SENSOR
383
+
384
+#if ENABLED(G29_RETRY_AND_RECOVER)
385
+
386
+  void event_probe_failure() {
387
+    #ifdef G29_FAILURE_COMMANDS
388
+      process_subcommands_now_P(PSTR(G29_FAILURE_COMMANDS));
389
+    #endif
390
+    #ifdef ACTION_ON_G29_FAILURE
391
+      host_action(PSTR(ACTION_ON_G29_FAILURE)); }
392
+    #endif
393
+    #if ENABLED(G29_HALT_ON_FAILURE)
394
+      #ifdef ACTION_ON_CANCEL
395
+        host_action_cancel();
396
+      #endif
397
+      kill(PSTR(MSG_ERR_PROBING_FAILED));
398
+    #endif
399
+  }
400
+
401
+  void event_probe_recover() {
402
+    #if ENABLED(HOST_PROMPT_SUPPORT)
403
+      host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying"));
404
+    #endif
405
+    #ifdef G29_RECOVER_COMMANDS
406
+      process_subcommands_now_P(PSTR(G29_RECOVER_COMMANDS));
407
+    #endif
408
+    #ifdef ACTION_ON_G29_RECOVER
409
+      host_action(PSTR(ACTION_ON_G29_RECOVER));
410
+    #endif
411
+  }
347 412
 
348
-#endif // HAS_ACTION_COMMANDS
413
+#endif
349 414
 
350 415
 /**
351 416
  * Manage several activities:

+ 7
- 22
Marlin/src/Marlin.h 查看文件

@@ -370,26 +370,11 @@ void protected_pin_err();
370 370
   inline void suicide() { OUT_WRITE(SUICIDE_PIN, LOW); }
371 371
 #endif
372 372
 
373
-#if HAS_ACTION_COMMANDS
374
-  #ifdef ACTION_ON_KILL
375
-    void host_action_kill();
376
-  #endif
377
-  #ifdef ACTION_ON_PAUSE
378
-    void host_action_pause();
379
-  #endif
380
-  #ifdef ACTION_ON_PAUSED
381
-    void host_action_paused();
382
-  #endif
383
-  #ifdef ACTION_ON_RESUME
384
-    void host_action_resume();
385
-  #endif
386
-  #ifdef ACTION_ON_RESUMED
387
-    void host_action_resumed();
388
-  #endif
389
-  #ifdef ACTION_ON_CANCEL
390
-    void host_action_cancel();
391
-  #endif
392
-  #ifdef ACTION_ON_FILAMENT_RUNOUT
393
-    void host_action_filament_runout(const bool eol=true);
394
-  #endif
373
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
374
+  void event_filament_runout();
375
+#endif
376
+
377
+#if ENABLED(G29_RETRY_AND_RECOVER)
378
+  void event_probe_recover();
379
+  void event_probe_failure();
395 380
 #endif

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

@@ -1033,20 +1033,10 @@
1033 1033
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1034 1034
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1035 1035
 
1036
-  // Set one or more commands to run on filament runout.
1037
-  //  - Always applies to SD-card printing.
1038
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1036
+  // Set one or more commands to execute on filament runout.
1037
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1039 1038
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1040 1039
 
1041
-  // With this option, if filament runs out during host-based printing, Marlin
1042
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1043
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1044
-  // will be used on filament runout for both host-based and SD-card printing.
1045
-  //
1046
-  // The host must be able to respond to the //action: command set here.
1047
-  //
1048
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1049
-
1050 1040
   // After a runout is detected, continue printing this length of filament
1051 1041
   // before executing the runout script. Useful for a sensor at the end of
1052 1042
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/default/Configuration_adv.h 查看文件

@@ -1007,13 +1007,7 @@
1007 1007
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1008 1008
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1009 1009
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1010
-  /**
1011
-   * Specify an action command to send to the host on a recovery attempt or failure.
1012
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1013
-   * The host must be configured to handle the action command.
1014
-   */
1015
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1016
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1010
+
1017 1011
 #endif
1018 1012
 
1019 1013
 // @section extras
@@ -2014,32 +2008,23 @@
2014 2008
 #endif
2015 2009
 
2016 2010
 /**
2017
- * Specify an action command to send to the host when the printer is killed.
2018
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2019
- * The host must be configured to handle the action command.
2020
- */
2021
-//#define ACTION_ON_KILL "poweroff"
2022
-
2023
-/**
2024
- * Specify an action command to send to the host on pause and resume.
2025
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2026
- * The host must be configured to handle the action command.
2011
+ * Host Action Commands
2027 2012
  *
2028
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2029
- *                    action while Marlin continues to process G-Code. (M24/M25)
2013
+ * Define host streamer action commands in compliance with the standard.
2030 2014
  *
2031
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2032
- *                    change actions and the host needs to stop sending commands
2033
- *                    until the machine is ready to resume. (M125/M600)
2015
+ * See https://reprap.org/wiki/G-code#Action_commands
2016
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2017
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2034 2018
  *
2035
- *           CANCEL : Instructs the host to abort the print job. Used when the
2036
- *                    print is canceled from the LCD menu.
2019
+ * Some features add reason codes to extend these commands.
2020
+ *
2021
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2022
+ * filament runout and other processes can be managed from the host side.
2037 2023
  */
2038
-//#define ACTION_ON_PAUSE   "pause"
2039
-//#define ACTION_ON_RESUME  "resume"
2040
-//#define ACTION_ON_PAUSED  "paused"
2041
-//#define ACTION_ON_RESUMED "resumed"
2042
-//#define ACTION_ON_CANCEL  "cancel"
2024
+//#define HOST_ACTION_COMMANDS
2025
+#if ENABLED(HOST_ACTION_COMMANDS)
2026
+  //#define HOST_PROMPT_SUPPORT
2027
+#endif
2043 2028
 
2044 2029
 //===========================================================================
2045 2030
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration.h 查看文件

@@ -1039,20 +1039,10 @@
1039 1039
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1040 1040
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1041 1041
 
1042
-  // Set one or more commands to run on filament runout.
1043
-  //  - Always applies to SD-card printing.
1044
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1042
+  // Set one or more commands to execute on filament runout.
1043
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1045 1044
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1046 1045
 
1047
-  // With this option, if filament runs out during host-based printing, Marlin
1048
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1049
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1050
-  // will be used on filament runout for both host-based and SD-card printing.
1051
-  //
1052
-  // The host must be able to respond to the //action: command set here.
1053
-  //
1054
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1055
-
1056 1046
   // After a runout is detected, continue printing this length of filament
1057 1047
   // before executing the runout script. Useful for a sensor at the end of
1058 1048
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration_adv.h 查看文件

@@ -1007,13 +1007,7 @@
1007 1007
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1008 1008
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1009 1009
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1010
-  /**
1011
-   * Specify an action command to send to the host on a recovery attempt or failure.
1012
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1013
-   * The host must be configured to handle the action command.
1014
-   */
1015
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1016
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1010
+
1017 1011
 #endif
1018 1012
 
1019 1013
 // @section extras
@@ -2016,32 +2010,23 @@
2016 2010
 #endif
2017 2011
 
2018 2012
 /**
2019
- * Specify an action command to send to the host when the printer is killed.
2020
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2021
- * The host must be configured to handle the action command.
2022
- */
2023
-//#define ACTION_ON_KILL "poweroff"
2024
-
2025
-/**
2026
- * Specify an action command to send to the host on pause and resume.
2027
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2028
- * The host must be configured to handle the action command.
2013
+ * Host Action Commands
2029 2014
  *
2030
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2031
- *                    action while Marlin continues to process G-Code. (M24/M25)
2015
+ * Define host streamer action commands in compliance with the standard.
2032 2016
  *
2033
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2034
- *                    change actions and the host needs to stop sending commands
2035
- *                    until the machine is ready to resume. (M125/M600)
2017
+ * See https://reprap.org/wiki/G-code#Action_commands
2018
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2019
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2036 2020
  *
2037
- *           CANCEL : Instructs the host to abort the print job. Used when the
2038
- *                    print is canceled from the LCD menu.
2021
+ * Some features add reason codes to extend these commands.
2022
+ *
2023
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2024
+ * filament runout and other processes can be managed from the host side.
2039 2025
  */
2040
-//#define ACTION_ON_PAUSE   "pause"
2041
-//#define ACTION_ON_RESUME  "resume"
2042
-//#define ACTION_ON_PAUSED  "paused"
2043
-//#define ACTION_ON_RESUMED "resumed"
2044
-//#define ACTION_ON_CANCEL  "cancel"
2026
+//#define HOST_ACTION_COMMANDS
2027
+#if ENABLED(HOST_ACTION_COMMANDS)
2028
+  //#define HOST_PROMPT_SUPPORT
2029
+#endif
2045 2030
 
2046 2031
 //===========================================================================
2047 2032
 //====================== I2C Position Encoder Settings ======================

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

@@ -1053,20 +1053,10 @@
1053 1053
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1054 1054
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1055 1055
 
1056
-  // Set one or more commands to run on filament runout.
1057
-  //  - Always applies to SD-card printing.
1058
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1056
+  // Set one or more commands to execute on filament runout.
1057
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1059 1058
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1060 1059
 
1061
-  // With this option, if filament runs out during host-based printing, Marlin
1062
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1063
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1064
-  // will be used on filament runout for both host-based and SD-card printing.
1065
-  //
1066
-  // The host must be able to respond to the //action: command set here.
1067
-  //
1068
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1069
-
1070 1060
   // After a runout is detected, continue printing this length of filament
1071 1061
   // before executing the runout script. Useful for a sensor at the end of
1072 1062
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

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

@@ -1033,20 +1033,10 @@
1033 1033
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1034 1034
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1035 1035
 
1036
-  // Set one or more commands to run on filament runout.
1037
-  //  - Always applies to SD-card printing.
1038
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1036
+  // Set one or more commands to execute on filament runout.
1037
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1039 1038
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1040 1039
 
1041
-  // With this option, if filament runs out during host-based printing, Marlin
1042
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1043
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1044
-  // will be used on filament runout for both host-based and SD-card printing.
1045
-  //
1046
-  // The host must be able to respond to the //action: command set here.
1047
-  //
1048
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1049
-
1050 1040
   // After a runout is detected, continue printing this length of filament
1051 1041
   // before executing the runout script. Useful for a sensor at the end of
1052 1042
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

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

@@ -1033,20 +1033,10 @@
1033 1033
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1034 1034
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1035 1035
 
1036
-  // Set one or more commands to run on filament runout.
1037
-  //  - Always applies to SD-card printing.
1038
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1036
+  // Set one or more commands to execute on filament runout.
1037
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1039 1038
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1040 1039
 
1041
-  // With this option, if filament runs out during host-based printing, Marlin
1042
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1043
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1044
-  // will be used on filament runout for both host-based and SD-card printing.
1045
-  //
1046
-  // The host must be able to respond to the //action: command set here.
1047
-  //
1048
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1049
-
1050 1040
   // After a runout is detected, continue printing this length of filament
1051 1041
   // before executing the runout script. Useful for a sensor at the end of
1052 1042
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Anet/A2/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

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

@@ -1033,20 +1033,10 @@
1033 1033
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1034 1034
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1035 1035
 
1036
-  // Set one or more commands to run on filament runout.
1037
-  //  - Always applies to SD-card printing.
1038
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1036
+  // Set one or more commands to execute on filament runout.
1037
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1039 1038
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1040 1039
 
1041
-  // With this option, if filament runs out during host-based printing, Marlin
1042
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1043
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1044
-  // will be used on filament runout for both host-based and SD-card printing.
1045
-  //
1046
-  // The host must be able to respond to the //action: command set here.
1047
-  //
1048
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1049
-
1050 1040
   // After a runout is detected, continue printing this length of filament
1051 1041
   // before executing the runout script. Useful for a sensor at the end of
1052 1042
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

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

@@ -1147,20 +1147,10 @@
1147 1147
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1148 1148
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1149 1149
 
1150
-  // Set one or more commands to run on filament runout.
1151
-  //  - Always applies to SD-card printing.
1152
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1150
+  // Set one or more commands to execute on filament runout.
1151
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1153 1152
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1154 1153
 
1155
-  // With this option, if filament runs out during host-based printing, Marlin
1156
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1157
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1158
-  // will be used on filament runout for both host-based and SD-card printing.
1159
-  //
1160
-  // The host must be able to respond to the //action: command set here.
1161
-  //
1162
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1163
-
1164 1154
   // After a runout is detected, continue printing this length of filament
1165 1155
   // before executing the runout script. Useful for a sensor at the end of
1166 1156
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Anet/A6/Configuration_adv.h 查看文件

@@ -1005,13 +1005,7 @@
1005 1005
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1006 1006
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1007 1007
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1008
-  /**
1009
-   * Specify an action command to send to the host on a recovery attempt or failure.
1010
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1011
-   * The host must be configured to handle the action command.
1012
-   */
1013
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1014
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1008
+
1015 1009
 #endif
1016 1010
 
1017 1011
 // @section extras
@@ -2012,32 +2006,23 @@
2012 2006
 #endif
2013 2007
 
2014 2008
 /**
2015
- * Specify an action command to send to the host when the printer is killed.
2016
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2017
- * The host must be configured to handle the action command.
2018
- */
2019
-//#define ACTION_ON_KILL "poweroff"
2020
-
2021
-/**
2022
- * Specify an action command to send to the host on pause and resume.
2023
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2024
- * The host must be configured to handle the action command.
2009
+ * Host Action Commands
2025 2010
  *
2026
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2027
- *                    action while Marlin continues to process G-Code. (M24/M25)
2011
+ * Define host streamer action commands in compliance with the standard.
2028 2012
  *
2029
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2030
- *                    change actions and the host needs to stop sending commands
2031
- *                    until the machine is ready to resume. (M125/M600)
2013
+ * See https://reprap.org/wiki/G-code#Action_commands
2014
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2015
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2032 2016
  *
2033
- *           CANCEL : Instructs the host to abort the print job. Used when the
2034
- *                    print is canceled from the LCD menu.
2017
+ * Some features add reason codes to extend these commands.
2018
+ *
2019
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2020
+ * filament runout and other processes can be managed from the host side.
2035 2021
  */
2036
-//#define ACTION_ON_PAUSE   "pause"
2037
-//#define ACTION_ON_RESUME  "resume"
2038
-//#define ACTION_ON_PAUSED  "paused"
2039
-//#define ACTION_ON_RESUMED "resumed"
2040
-//#define ACTION_ON_CANCEL  "cancel"
2022
+//#define HOST_ACTION_COMMANDS
2023
+#if ENABLED(HOST_ACTION_COMMANDS)
2024
+  //#define HOST_PROMPT_SUPPORT
2025
+#endif
2041 2026
 
2042 2027
 //===========================================================================
2043 2028
 //====================== I2C Position Encoder Settings ======================

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

@@ -1046,20 +1046,10 @@
1046 1046
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1047 1047
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1048 1048
 
1049
-  // Set one or more commands to run on filament runout.
1050
-  //  - Always applies to SD-card printing.
1051
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1049
+  // Set one or more commands to execute on filament runout.
1050
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1052 1051
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1053 1052
 
1054
-  // With this option, if filament runs out during host-based printing, Marlin
1055
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1056
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1057
-  // will be used on filament runout for both host-based and SD-card printing.
1058
-  //
1059
-  // The host must be able to respond to the //action: command set here.
1060
-  //
1061
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1062
-
1063 1053
   // After a runout is detected, continue printing this length of filament
1064 1054
   // before executing the runout script. Useful for a sensor at the end of
1065 1055
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Anet/A8/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/AnyCubic/i3/Configuration.h 查看文件

@@ -1043,20 +1043,10 @@
1043 1043
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1044 1044
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1045 1045
 
1046
-  // Set one or more commands to run on filament runout.
1047
-  //  - Always applies to SD-card printing.
1048
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1046
+  // Set one or more commands to execute on filament runout.
1047
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1049 1048
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1050 1049
 
1051
-  // With this option, if filament runs out during host-based printing, Marlin
1052
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1053
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1054
-  // will be used on filament runout for both host-based and SD-card printing.
1055
-  //
1056
-  // The host must be able to respond to the //action: command set here.
1057
-  //
1058
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1059
-
1060 1050
   // After a runout is detected, continue printing this length of filament
1061 1051
   // before executing the runout script. Useful for a sensor at the end of
1062 1052
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/AnyCubic/i3/Configuration_adv.h 查看文件

@@ -1007,13 +1007,7 @@
1007 1007
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1008 1008
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1009 1009
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1010
-  /**
1011
-   * Specify an action command to send to the host on a recovery attempt or failure.
1012
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1013
-   * The host must be configured to handle the action command.
1014
-   */
1015
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1016
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1010
+
1017 1011
 #endif
1018 1012
 
1019 1013
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/ArmEd/Configuration.h 查看文件

@@ -1034,20 +1034,10 @@
1034 1034
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1035 1035
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1036 1036
 
1037
-  // Set one or more commands to run on filament runout.
1038
-  //  - Always applies to SD-card printing.
1039
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1037
+  // Set one or more commands to execute on filament runout.
1038
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1040 1039
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1041 1040
 
1042
-  // With this option, if filament runs out during host-based printing, Marlin
1043
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1044
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1045
-  // will be used on filament runout for both host-based and SD-card printing.
1046
-  //
1047
-  // The host must be able to respond to the //action: command set here.
1048
-  //
1049
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1050
-
1051 1041
   // After a runout is detected, continue printing this length of filament
1052 1042
   // before executing the runout script. Useful for a sensor at the end of
1053 1043
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/ArmEd/Configuration_adv.h 查看文件

@@ -1011,13 +1011,7 @@
1011 1011
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1012 1012
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1013 1013
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1014
-  /**
1015
-   * Specify an action command to send to the host on a recovery attempt or failure.
1016
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1017
-   * The host must be configured to handle the action command.
1018
-   */
1019
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1020
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1014
+
1021 1015
 #endif
1022 1016
 
1023 1017
 // @section extras
@@ -2018,32 +2012,23 @@
2018 2012
 #endif
2019 2013
 
2020 2014
 /**
2021
- * Specify an action command to send to the host when the printer is killed.
2022
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2023
- * The host must be configured to handle the action command.
2024
- */
2025
-//#define ACTION_ON_KILL "poweroff"
2026
-
2027
-/**
2028
- * Specify an action command to send to the host on pause and resume.
2029
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2030
- * The host must be configured to handle the action command.
2015
+ * Host Action Commands
2031 2016
  *
2032
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2033
- *                    action while Marlin continues to process G-Code. (M24/M25)
2017
+ * Define host streamer action commands in compliance with the standard.
2034 2018
  *
2035
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2036
- *                    change actions and the host needs to stop sending commands
2037
- *                    until the machine is ready to resume. (M125/M600)
2019
+ * See https://reprap.org/wiki/G-code#Action_commands
2020
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2021
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2038 2022
  *
2039
- *           CANCEL : Instructs the host to abort the print job. Used when the
2040
- *                    print is canceled from the LCD menu.
2023
+ * Some features add reason codes to extend these commands.
2024
+ *
2025
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2026
+ * filament runout and other processes can be managed from the host side.
2041 2027
  */
2042
-//#define ACTION_ON_PAUSE   "pause"
2043
-//#define ACTION_ON_RESUME  "resume"
2044
-//#define ACTION_ON_PAUSED  "paused"
2045
-//#define ACTION_ON_RESUMED "resumed"
2046
-//#define ACTION_ON_CANCEL  "cancel"
2028
+//#define HOST_ACTION_COMMANDS
2029
+#if ENABLED(HOST_ACTION_COMMANDS)
2030
+  //#define HOST_PROMPT_SUPPORT
2031
+#endif
2047 2032
 
2048 2033
 //===========================================================================
2049 2034
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/Azteeg/X5GT/Configuration.h 查看文件

@@ -1033,20 +1033,10 @@
1033 1033
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1034 1034
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1035 1035
 
1036
-  // Set one or more commands to run on filament runout.
1037
-  //  - Always applies to SD-card printing.
1038
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1036
+  // Set one or more commands to execute on filament runout.
1037
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1039 1038
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1040 1039
 
1041
-  // With this option, if filament runs out during host-based printing, Marlin
1042
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1043
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1044
-  // will be used on filament runout for both host-based and SD-card printing.
1045
-  //
1046
-  // The host must be able to respond to the //action: command set here.
1047
-  //
1048
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1049
-
1050 1040
   // After a runout is detected, continue printing this length of filament
1051 1041
   // before executing the runout script. Useful for a sensor at the end of
1052 1042
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 2
- 12
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h 查看文件

@@ -1033,20 +1033,10 @@
1033 1033
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1034 1034
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1035 1035
 
1036
-  // Set one or more commands to run on filament runout.
1037
-  //  - Always applies to SD-card printing.
1038
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1036
+  // Set one or more commands to execute on filament runout.
1037
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1039 1038
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1040 1039
 
1041
-  // With this option, if filament runs out during host-based printing, Marlin
1042
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1043
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1044
-  // will be used on filament runout for both host-based and SD-card printing.
1045
-  //
1046
-  // The host must be able to respond to the //action: command set here.
1047
-  //
1048
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1049
-
1050 1040
   // After a runout is detected, continue printing this length of filament
1051 1041
   // before executing the runout script. Useful for a sensor at the end of
1052 1042
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h 查看文件

@@ -1005,13 +1005,7 @@
1005 1005
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1006 1006
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1007 1007
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1008
-  /**
1009
-   * Specify an action command to send to the host on a recovery attempt or failure.
1010
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1011
-   * The host must be configured to handle the action command.
1012
-   */
1013
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1014
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1008
+
1015 1009
 #endif
1016 1010
 
1017 1011
 // @section extras
@@ -2012,32 +2006,23 @@
2012 2006
 #endif
2013 2007
 
2014 2008
 /**
2015
- * Specify an action command to send to the host when the printer is killed.
2016
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2017
- * The host must be configured to handle the action command.
2018
- */
2019
-//#define ACTION_ON_KILL "poweroff"
2020
-
2021
-/**
2022
- * Specify an action command to send to the host on pause and resume.
2023
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2024
- * The host must be configured to handle the action command.
2009
+ * Host Action Commands
2025 2010
  *
2026
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2027
- *                    action while Marlin continues to process G-Code. (M24/M25)
2011
+ * Define host streamer action commands in compliance with the standard.
2028 2012
  *
2029
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2030
- *                    change actions and the host needs to stop sending commands
2031
- *                    until the machine is ready to resume. (M125/M600)
2013
+ * See https://reprap.org/wiki/G-code#Action_commands
2014
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2015
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2032 2016
  *
2033
- *           CANCEL : Instructs the host to abort the print job. Used when the
2034
- *                    print is canceled from the LCD menu.
2017
+ * Some features add reason codes to extend these commands.
2018
+ *
2019
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2020
+ * filament runout and other processes can be managed from the host side.
2035 2021
  */
2036
-//#define ACTION_ON_PAUSE   "pause"
2037
-//#define ACTION_ON_RESUME  "resume"
2038
-//#define ACTION_ON_PAUSED  "paused"
2039
-//#define ACTION_ON_RESUMED "resumed"
2040
-//#define ACTION_ON_CANCEL  "cancel"
2022
+//#define HOST_ACTION_COMMANDS
2023
+#if ENABLED(HOST_ACTION_COMMANDS)
2024
+  //#define HOST_PROMPT_SUPPORT
2025
+#endif
2041 2026
 
2042 2027
 //===========================================================================
2043 2028
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h 查看文件

@@ -1033,20 +1033,10 @@
1033 1033
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1034 1034
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1035 1035
 
1036
-  // Set one or more commands to run on filament runout.
1037
-  //  - Always applies to SD-card printing.
1038
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1036
+  // Set one or more commands to execute on filament runout.
1037
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1039 1038
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1040 1039
 
1041
-  // With this option, if filament runs out during host-based printing, Marlin
1042
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1043
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1044
-  // will be used on filament runout for both host-based and SD-card printing.
1045
-  //
1046
-  // The host must be able to respond to the //action: command set here.
1047
-  //
1048
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1049
-
1050 1040
   // After a runout is detected, continue printing this length of filament
1051 1041
   // before executing the runout script. Useful for a sensor at the end of
1052 1042
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

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

@@ -1021,20 +1021,10 @@
1021 1021
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1022 1022
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1023 1023
 
1024
-  // Set one or more commands to run on filament runout.
1025
-  //  - Always applies to SD-card printing.
1026
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1024
+  // Set one or more commands to execute on filament runout.
1025
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1027 1026
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1028 1027
 
1029
-  // With this option, if filament runs out during host-based printing, Marlin
1030
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1031
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1032
-  // will be used on filament runout for both host-based and SD-card printing.
1033
-  //
1034
-  // The host must be able to respond to the //action: command set here.
1035
-  //
1036
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1037
-
1038 1028
   // After a runout is detected, continue printing this length of filament
1039 1029
   // before executing the runout script. Useful for a sensor at the end of
1040 1030
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

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

@@ -1033,20 +1033,10 @@
1033 1033
   #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
1034 1034
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1035 1035
 
1036
-  // Set one or more commands to run on filament runout.
1037
-  //  - Always applies to SD-card printing.
1038
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1036
+  // Set one or more commands to execute on filament runout.
1037
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1039 1038
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1040 1039
 
1041
-  // With this option, if filament runs out during host-based printing, Marlin
1042
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1043
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1044
-  // will be used on filament runout for both host-based and SD-card printing.
1045
-  //
1046
-  // The host must be able to respond to the //action: command set here.
1047
-  //
1048
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1049
-
1050 1040
   // After a runout is detected, continue printing this length of filament
1051 1041
   // before executing the runout script. Useful for a sensor at the end of
1052 1042
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h 查看文件

@@ -1014,13 +1014,7 @@
1014 1014
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1015 1015
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1016 1016
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1017
-  /**
1018
-   * Specify an action command to send to the host on a recovery attempt or failure.
1019
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1020
-   * The host must be configured to handle the action command.
1021
-   */
1022
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1023
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1017
+
1024 1018
 #endif
1025 1019
 
1026 1020
 // @section extras
@@ -2021,32 +2015,23 @@
2021 2015
 #endif
2022 2016
 
2023 2017
 /**
2024
- * Specify an action command to send to the host when the printer is killed.
2025
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2026
- * The host must be configured to handle the action command.
2027
- */
2028
-//#define ACTION_ON_KILL "poweroff"
2029
-
2030
-/**
2031
- * Specify an action command to send to the host on pause and resume.
2032
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2033
- * The host must be configured to handle the action command.
2018
+ * Host Action Commands
2034 2019
  *
2035
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2036
- *                    action while Marlin continues to process G-Code. (M24/M25)
2020
+ * Define host streamer action commands in compliance with the standard.
2037 2021
  *
2038
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2039
- *                    change actions and the host needs to stop sending commands
2040
- *                    until the machine is ready to resume. (M125/M600)
2022
+ * See https://reprap.org/wiki/G-code#Action_commands
2023
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2024
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2041 2025
  *
2042
- *           CANCEL : Instructs the host to abort the print job. Used when the
2043
- *                    print is canceled from the LCD menu.
2026
+ * Some features add reason codes to extend these commands.
2027
+ *
2028
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2029
+ * filament runout and other processes can be managed from the host side.
2044 2030
  */
2045
-//#define ACTION_ON_PAUSE   "pause"
2046
-//#define ACTION_ON_RESUME  "resume"
2047
-//#define ACTION_ON_PAUSED  "paused"
2048
-//#define ACTION_ON_RESUMED "resumed"
2049
-//#define ACTION_ON_CANCEL  "cancel"
2031
+//#define HOST_ACTION_COMMANDS
2032
+#if ENABLED(HOST_ACTION_COMMANDS)
2033
+  //#define HOST_PROMPT_SUPPORT
2034
+#endif
2050 2035
 
2051 2036
 //===========================================================================
2052 2037
 //====================== I2C Position Encoder Settings ======================

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

@@ -1021,20 +1021,10 @@
1021 1021
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1022 1022
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1023 1023
 
1024
-  // Set one or more commands to run on filament runout.
1025
-  //  - Always applies to SD-card printing.
1026
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1024
+  // Set one or more commands to execute on filament runout.
1025
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1027 1026
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1028 1027
 
1029
-  // With this option, if filament runs out during host-based printing, Marlin
1030
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1031
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1032
-  // will be used on filament runout for both host-based and SD-card printing.
1033
-  //
1034
-  // The host must be able to respond to the //action: command set here.
1035
-  //
1036
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1037
-
1038 1028
   // After a runout is detected, continue printing this length of filament
1039 1029
   // before executing the runout script. Useful for a sensor at the end of
1040 1030
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

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

@@ -1032,20 +1032,10 @@
1032 1032
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1033 1033
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1034 1034
 
1035
-  // Set one or more commands to run on filament runout.
1036
-  //  - Always applies to SD-card printing.
1037
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1035
+  // Set one or more commands to execute on filament runout.
1036
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1038 1037
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1039 1038
 
1040
-  // With this option, if filament runs out during host-based printing, Marlin
1041
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1042
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1043
-  // will be used on filament runout for both host-based and SD-card printing.
1044
-  //
1045
-  // The host must be able to respond to the //action: command set here.
1046
-  //
1047
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1048
-
1049 1039
   // After a runout is detected, continue printing this length of filament
1050 1040
   // before executing the runout script. Useful for a sensor at the end of
1051 1041
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Cartesio/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

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

@@ -1043,20 +1043,10 @@
1043 1043
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1044 1044
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1045 1045
 
1046
-  // Set one or more commands to run on filament runout.
1047
-  //  - Always applies to SD-card printing.
1048
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1046
+  // Set one or more commands to execute on filament runout.
1047
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1049 1048
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1050 1049
 
1051
-  // With this option, if filament runs out during host-based printing, Marlin
1052
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1053
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1054
-  // will be used on filament runout for both host-based and SD-card printing.
1055
-  //
1056
-  // The host must be able to respond to the //action: command set here.
1057
-  //
1058
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1059
-
1060 1050
   // After a runout is detected, continue printing this length of filament
1061 1051
   // before executing the runout script. Useful for a sensor at the end of
1062 1052
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2016,32 +2010,23 @@
2016 2010
 #endif
2017 2011
 
2018 2012
 /**
2019
- * Specify an action command to send to the host when the printer is killed.
2020
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2021
- * The host must be configured to handle the action command.
2022
- */
2023
-//#define ACTION_ON_KILL "poweroff"
2024
-
2025
-/**
2026
- * Specify an action command to send to the host on pause and resume.
2027
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2028
- * The host must be configured to handle the action command.
2013
+ * Host Action Commands
2029 2014
  *
2030
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2031
- *                    action while Marlin continues to process G-Code. (M24/M25)
2015
+ * Define host streamer action commands in compliance with the standard.
2032 2016
  *
2033
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2034
- *                    change actions and the host needs to stop sending commands
2035
- *                    until the machine is ready to resume. (M125/M600)
2017
+ * See https://reprap.org/wiki/G-code#Action_commands
2018
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2019
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2036 2020
  *
2037
- *           CANCEL : Instructs the host to abort the print job. Used when the
2038
- *                    print is canceled from the LCD menu.
2021
+ * Some features add reason codes to extend these commands.
2022
+ *
2023
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2024
+ * filament runout and other processes can be managed from the host side.
2039 2025
  */
2040
-//#define ACTION_ON_PAUSE   "pause"
2041
-//#define ACTION_ON_RESUME  "resume"
2042
-//#define ACTION_ON_PAUSED  "paused"
2043
-//#define ACTION_ON_RESUMED "resumed"
2044
-//#define ACTION_ON_CANCEL  "cancel"
2026
+//#define HOST_ACTION_COMMANDS
2027
+#if ENABLED(HOST_ACTION_COMMANDS)
2028
+  //#define HOST_PROMPT_SUPPORT
2029
+#endif
2045 2030
 
2046 2031
 //===========================================================================
2047 2032
 //====================== I2C Position Encoder Settings ======================

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

@@ -1034,20 +1034,10 @@
1034 1034
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1035 1035
   #define FIL_RUNOUT_PIN 2 // Creality CR10-S stock sensor
1036 1036
 
1037
-  // Set one or more commands to run on filament runout.
1038
-  //  - Always applies to SD-card printing.
1039
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1037
+  // Set one or more commands to execute on filament runout.
1038
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1040 1039
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1041 1040
 
1042
-  // With this option, if filament runs out during host-based printing, Marlin
1043
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1044
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1045
-  // will be used on filament runout for both host-based and SD-card printing.
1046
-  //
1047
-  // The host must be able to respond to the //action: command set here.
1048
-  //
1049
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1050
-
1051 1041
   // After a runout is detected, continue printing this length of filament
1052 1042
   // before executing the runout script. Useful for a sensor at the end of
1053 1043
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

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

@@ -1052,20 +1052,10 @@
1052 1052
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1053 1053
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1054 1054
 
1055
-  // Set one or more commands to run on filament runout.
1056
-  //  - Always applies to SD-card printing.
1057
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1055
+  // Set one or more commands to execute on filament runout.
1056
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1058 1057
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1059 1058
 
1060
-  // With this option, if filament runs out during host-based printing, Marlin
1061
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1062
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1063
-  // will be used on filament runout for both host-based and SD-card printing.
1064
-  //
1065
-  // The host must be able to respond to the //action: command set here.
1066
-  //
1067
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1068
-
1069 1059
   // After a runout is detected, continue printing this length of filament
1070 1060
   // before executing the runout script. Useful for a sensor at the end of
1071 1061
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

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

@@ -1043,20 +1043,10 @@
1043 1043
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1044 1044
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1045 1045
 
1046
-  // Set one or more commands to run on filament runout.
1047
-  //  - Always applies to SD-card printing.
1048
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1046
+  // Set one or more commands to execute on filament runout.
1047
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1049 1048
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1050 1049
 
1051
-  // With this option, if filament runs out during host-based printing, Marlin
1052
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1053
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1054
-  // will be used on filament runout for both host-based and SD-card printing.
1055
-  //
1056
-  // The host must be able to respond to the //action: command set here.
1057
-  //
1058
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1059
-
1060 1050
   // After a runout is detected, continue printing this length of filament
1061 1051
   // before executing the runout script. Useful for a sensor at the end of
1062 1052
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/Creality/Ender-2/Configuration.h 查看文件

@@ -1037,20 +1037,10 @@
1037 1037
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1038 1038
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1039 1039
 
1040
-  // Set one or more commands to run on filament runout.
1041
-  //  - Always applies to SD-card printing.
1042
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1040
+  // Set one or more commands to execute on filament runout.
1041
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1043 1042
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1044 1043
 
1045
-  // With this option, if filament runs out during host-based printing, Marlin
1046
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1047
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1048
-  // will be used on filament runout for both host-based and SD-card printing.
1049
-  //
1050
-  // The host must be able to respond to the //action: command set here.
1051
-  //
1052
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1053
-
1054 1044
   // After a runout is detected, continue printing this length of filament
1055 1045
   // before executing the runout script. Useful for a sensor at the end of
1056 1046
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/Creality/Ender-3/Configuration.h 查看文件

@@ -1037,20 +1037,10 @@
1037 1037
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1038 1038
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1039 1039
 
1040
-  // Set one or more commands to run on filament runout.
1041
-  //  - Always applies to SD-card printing.
1042
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1040
+  // Set one or more commands to execute on filament runout.
1041
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1043 1042
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1044 1043
 
1045
-  // With this option, if filament runs out during host-based printing, Marlin
1046
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1047
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1048
-  // will be used on filament runout for both host-based and SD-card printing.
1049
-  //
1050
-  // The host must be able to respond to the //action: command set here.
1051
-  //
1052
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1053
-
1054 1044
   // After a runout is detected, continue printing this length of filament
1055 1045
   // before executing the runout script. Useful for a sensor at the end of
1056 1046
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/Creality/Ender-4/Configuration.h 查看文件

@@ -1043,20 +1043,10 @@
1043 1043
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1044 1044
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1045 1045
 
1046
-  // Set one or more commands to run on filament runout.
1047
-  //  - Always applies to SD-card printing.
1048
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1046
+  // Set one or more commands to execute on filament runout.
1047
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1049 1048
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1050 1049
 
1051
-  // With this option, if filament runs out during host-based printing, Marlin
1052
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1053
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1054
-  // will be used on filament runout for both host-based and SD-card printing.
1055
-  //
1056
-  // The host must be able to respond to the //action: command set here.
1057
-  //
1058
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1059
-
1060 1050
   // After a runout is detected, continue printing this length of filament
1061 1051
   // before executing the runout script. Useful for a sensor at the end of
1062 1052
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/Einstart-S/Configuration.h 查看文件

@@ -1043,20 +1043,10 @@
1043 1043
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1044 1044
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1045 1045
 
1046
-  // Set one or more commands to run on filament runout.
1047
-  //  - Always applies to SD-card printing.
1048
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1046
+  // Set one or more commands to execute on filament runout.
1047
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1049 1048
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1050 1049
 
1051
-  // With this option, if filament runs out during host-based printing, Marlin
1052
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1053
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1054
-  // will be used on filament runout for both host-based and SD-card printing.
1055
-  //
1056
-  // The host must be able to respond to the //action: command set here.
1057
-  //
1058
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1059
-
1060 1050
   // After a runout is detected, continue printing this length of filament
1061 1051
   // before executing the runout script. Useful for a sensor at the end of
1062 1052
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Einstart-S/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

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

@@ -1015,20 +1015,10 @@
1015 1015
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1016 1016
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1017 1017
 
1018
-  // Set one or more commands to run on filament runout.
1019
-  //  - Always applies to SD-card printing.
1020
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1018
+  // Set one or more commands to execute on filament runout.
1019
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1021 1020
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1022 1021
 
1023
-  // With this option, if filament runs out during host-based printing, Marlin
1024
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1025
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1026
-  // will be used on filament runout for both host-based and SD-card printing.
1027
-  //
1028
-  // The host must be able to respond to the //action: command set here.
1029
-  //
1030
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1031
-
1032 1022
   // After a runout is detected, continue printing this length of filament
1033 1023
   // before executing the runout script. Useful for a sensor at the end of
1034 1024
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Felix/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

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

@@ -1015,20 +1015,10 @@
1015 1015
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1016 1016
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1017 1017
 
1018
-  // Set one or more commands to run on filament runout.
1019
-  //  - Always applies to SD-card printing.
1020
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1018
+  // Set one or more commands to execute on filament runout.
1019
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1021 1020
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1022 1021
 
1023
-  // With this option, if filament runs out during host-based printing, Marlin
1024
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1025
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1026
-  // will be used on filament runout for both host-based and SD-card printing.
1027
-  //
1028
-  // The host must be able to respond to the //action: command set here.
1029
-  //
1030
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1031
-
1032 1022
   // After a runout is detected, continue printing this length of filament
1033 1023
   // before executing the runout script. Useful for a sensor at the end of
1034 1024
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 2
- 12
Marlin/src/config/examples/FlashForge/CreatorPro/Configuration.h 查看文件

@@ -1026,20 +1026,10 @@
1026 1026
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1027 1027
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1028 1028
 
1029
-  // Set one or more commands to run on filament runout.
1030
-  //  - Always applies to SD-card printing.
1031
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1029
+  // Set one or more commands to execute on filament runout.
1030
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1032 1031
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1033 1032
 
1034
-  // With this option, if filament runs out during host-based printing, Marlin
1035
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1036
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1037
-  // will be used on filament runout for both host-based and SD-card printing.
1038
-  //
1039
-  // The host must be able to respond to the //action: command set here.
1040
-  //
1041
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1042
-
1043 1033
   // After a runout is detected, continue printing this length of filament
1044 1034
   // before executing the runout script. Useful for a sensor at the end of
1045 1035
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/FlashForge/CreatorPro/Configuration_adv.h 查看文件

@@ -1005,13 +1005,7 @@
1005 1005
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1006 1006
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1007 1007
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1008
-  /**
1009
-   * Specify an action command to send to the host on a recovery attempt or failure.
1010
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1011
-   * The host must be configured to handle the action command.
1012
-   */
1013
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1014
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1008
+
1015 1009
 #endif
1016 1010
 
1017 1011
 // @section extras
@@ -2012,32 +2006,23 @@
2012 2006
 #endif
2013 2007
 
2014 2008
 /**
2015
- * Specify an action command to send to the host when the printer is killed.
2016
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2017
- * The host must be configured to handle the action command.
2018
- */
2019
-//#define ACTION_ON_KILL "poweroff"
2020
-
2021
-/**
2022
- * Specify an action command to send to the host on pause and resume.
2023
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2024
- * The host must be configured to handle the action command.
2009
+ * Host Action Commands
2025 2010
  *
2026
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2027
- *                    action while Marlin continues to process G-Code. (M24/M25)
2011
+ * Define host streamer action commands in compliance with the standard.
2028 2012
  *
2029
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2030
- *                    change actions and the host needs to stop sending commands
2031
- *                    until the machine is ready to resume. (M125/M600)
2013
+ * See https://reprap.org/wiki/G-code#Action_commands
2014
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2015
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2032 2016
  *
2033
- *           CANCEL : Instructs the host to abort the print job. Used when the
2034
- *                    print is canceled from the LCD menu.
2017
+ * Some features add reason codes to extend these commands.
2018
+ *
2019
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2020
+ * filament runout and other processes can be managed from the host side.
2035 2021
  */
2036
-//#define ACTION_ON_PAUSE   "pause"
2037
-//#define ACTION_ON_RESUME  "resume"
2038
-//#define ACTION_ON_PAUSED  "paused"
2039
-//#define ACTION_ON_RESUMED "resumed"
2040
-//#define ACTION_ON_CANCEL  "cancel"
2022
+//#define HOST_ACTION_COMMANDS
2023
+#if ENABLED(HOST_ACTION_COMMANDS)
2024
+  //#define HOST_PROMPT_SUPPORT
2025
+#endif
2041 2026
 
2042 2027
 //===========================================================================
2043 2028
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h 查看文件

@@ -1039,20 +1039,10 @@
1039 1039
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1040 1040
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1041 1041
 
1042
-  // Set one or more commands to run on filament runout.
1043
-  //  - Always applies to SD-card printing.
1044
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1042
+  // Set one or more commands to execute on filament runout.
1043
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1045 1044
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1046 1045
 
1047
-  // With this option, if filament runs out during host-based printing, Marlin
1048
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1049
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1050
-  // will be used on filament runout for both host-based and SD-card printing.
1051
-  //
1052
-  // The host must be able to respond to the //action: command set here.
1053
-  //
1054
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1055
-
1056 1046
   // After a runout is detected, continue printing this length of filament
1057 1047
   // before executing the runout script. Useful for a sensor at the end of
1058 1048
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/Formbot/Raptor/Configuration.h 查看文件

@@ -1131,20 +1131,10 @@
1131 1131
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1132 1132
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1133 1133
 
1134
-  // Set one or more commands to run on filament runout.
1135
-  //  - Always applies to SD-card printing.
1136
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1134
+  // Set one or more commands to execute on filament runout.
1135
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1137 1136
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1138 1137
 
1139
-  // With this option, if filament runs out during host-based printing, Marlin
1140
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1141
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1142
-  // will be used on filament runout for both host-based and SD-card printing.
1143
-  //
1144
-  // The host must be able to respond to the //action: command set here.
1145
-  //
1146
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1147
-
1148 1138
   // After a runout is detected, continue printing this length of filament
1149 1139
   // before executing the runout script. Useful for a sensor at the end of
1150 1140
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h 查看文件

@@ -1008,13 +1008,7 @@
1008 1008
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1009 1009
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1010 1010
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1011
-  /**
1012
-   * Specify an action command to send to the host on a recovery attempt or failure.
1013
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1014
-   * The host must be configured to handle the action command.
1015
-   */
1016
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1017
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1011
+
1018 1012
 #endif
1019 1013
 
1020 1014
 // @section extras
@@ -2017,32 +2011,23 @@
2017 2011
 #endif
2018 2012
 
2019 2013
 /**
2020
- * Specify an action command to send to the host when the printer is killed.
2021
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2022
- * The host must be configured to handle the action command.
2023
- */
2024
-//#define ACTION_ON_KILL "poweroff"
2025
-
2026
-/**
2027
- * Specify an action command to send to the host on pause and resume.
2028
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2029
- * The host must be configured to handle the action command.
2014
+ * Host Action Commands
2030 2015
  *
2031
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2032
- *                    action while Marlin continues to process G-Code. (M24/M25)
2016
+ * Define host streamer action commands in compliance with the standard.
2033 2017
  *
2034
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2035
- *                    change actions and the host needs to stop sending commands
2036
- *                    until the machine is ready to resume. (M125/M600)
2018
+ * See https://reprap.org/wiki/G-code#Action_commands
2019
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2020
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2037 2021
  *
2038
- *           CANCEL : Instructs the host to abort the print job. Used when the
2039
- *                    print is canceled from the LCD menu.
2022
+ * Some features add reason codes to extend these commands.
2023
+ *
2024
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2025
+ * filament runout and other processes can be managed from the host side.
2040 2026
  */
2041
-#define ACTION_ON_PAUSE   "pause"
2042
-#define ACTION_ON_RESUME  "resume"
2043
-//#define ACTION_ON_PAUSED  "paused"
2044
-//#define ACTION_ON_RESUMED "resumed"
2045
-//#define ACTION_ON_CANCEL  "cancel"
2027
+//#define HOST_ACTION_COMMANDS
2028
+#if ENABLED(HOST_ACTION_COMMANDS)
2029
+  //#define HOST_PROMPT_SUPPORT
2030
+#endif
2046 2031
 
2047 2032
 //===========================================================================
2048 2033
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h 查看文件

@@ -1063,20 +1063,10 @@
1063 1063
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1064 1064
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1065 1065
 
1066
-  // Set one or more commands to run on filament runout.
1067
-  //  - Always applies to SD-card printing.
1068
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1066
+  // Set one or more commands to execute on filament runout.
1067
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1069 1068
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1070 1069
 
1071
-  // With this option, if filament runs out during host-based printing, Marlin
1072
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1073
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1074
-  // will be used on filament runout for both host-based and SD-card printing.
1075
-  //
1076
-  // The host must be able to respond to the //action: command set here.
1077
-  //
1078
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1079
-
1080 1070
   // After a runout is detected, continue printing this length of filament
1081 1071
   // before executing the runout script. Useful for a sensor at the end of
1082 1072
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h 查看文件

@@ -1011,13 +1011,7 @@
1011 1011
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1012 1012
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1013 1013
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1014
-  /**
1015
-   * Specify an action command to send to the host on a recovery attempt or failure.
1016
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1017
-   * The host must be configured to handle the action command.
1018
-   */
1019
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1020
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1014
+
1021 1015
 #endif
1022 1016
 
1023 1017
 // @section extras
@@ -2018,32 +2012,23 @@
2018 2012
 #endif
2019 2013
 
2020 2014
 /**
2021
- * Specify an action command to send to the host when the printer is killed.
2022
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2023
- * The host must be configured to handle the action command.
2024
- */
2025
-//#define ACTION_ON_KILL "poweroff"
2026
-
2027
-/**
2028
- * Specify an action command to send to the host on pause and resume.
2029
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2030
- * The host must be configured to handle the action command.
2015
+ * Host Action Commands
2031 2016
  *
2032
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2033
- *                    action while Marlin continues to process G-Code. (M24/M25)
2017
+ * Define host streamer action commands in compliance with the standard.
2034 2018
  *
2035
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2036
- *                    change actions and the host needs to stop sending commands
2037
- *                    until the machine is ready to resume. (M125/M600)
2019
+ * See https://reprap.org/wiki/G-code#Action_commands
2020
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2021
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2038 2022
  *
2039
- *           CANCEL : Instructs the host to abort the print job. Used when the
2040
- *                    print is canceled from the LCD menu.
2023
+ * Some features add reason codes to extend these commands.
2024
+ *
2025
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2026
+ * filament runout and other processes can be managed from the host side.
2041 2027
  */
2042
-#define ACTION_ON_PAUSE   "pause"
2043
-#define ACTION_ON_RESUME  "resume"
2044
-//#define ACTION_ON_PAUSED  "paused"
2045
-//#define ACTION_ON_RESUMED "resumed"
2046
-//#define ACTION_ON_CANCEL  "cancel"
2028
+//#define HOST_ACTION_COMMANDS
2029
+#if ENABLED(HOST_ACTION_COMMANDS)
2030
+  //#define HOST_PROMPT_SUPPORT
2031
+#endif
2047 2032
 
2048 2033
 //===========================================================================
2049 2034
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h 查看文件

@@ -1058,20 +1058,10 @@
1058 1058
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1059 1059
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1060 1060
 
1061
-  // Set one or more commands to run on filament runout.
1062
-  //  - Always applies to SD-card printing.
1063
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1061
+  // Set one or more commands to execute on filament runout.
1062
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1064 1063
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1065 1064
 
1066
-  // With this option, if filament runs out during host-based printing, Marlin
1067
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1068
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1069
-  // will be used on filament runout for both host-based and SD-card printing.
1070
-  //
1071
-  // The host must be able to respond to the //action: command set here.
1072
-  //
1073
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1074
-
1075 1065
   // After a runout is detected, continue printing this length of filament
1076 1066
   // before executing the runout script. Useful for a sensor at the end of
1077 1067
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h 查看文件

@@ -1011,13 +1011,7 @@
1011 1011
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1012 1012
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1013 1013
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1014
-  /**
1015
-   * Specify an action command to send to the host on a recovery attempt or failure.
1016
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1017
-   * The host must be configured to handle the action command.
1018
-   */
1019
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1020
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1014
+
1021 1015
 #endif
1022 1016
 
1023 1017
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-#define ACTION_ON_PAUSE   "pause"
2038
-#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

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

@@ -1018,20 +1018,10 @@
1018 1018
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1019 1019
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1020 1020
 
1021
-  // Set one or more commands to run on filament runout.
1022
-  //  - Always applies to SD-card printing.
1023
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1021
+  // Set one or more commands to execute on filament runout.
1022
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1024 1023
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1025 1024
 
1026
-  // With this option, if filament runs out during host-based printing, Marlin
1027
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1028
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1029
-  // will be used on filament runout for both host-based and SD-card printing.
1030
-  //
1031
-  // The host must be able to respond to the //action: command set here.
1032
-  //
1033
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1034
-
1035 1025
   // After a runout is detected, continue printing this length of filament
1036 1026
   // before executing the runout script. Useful for a sensor at the end of
1037 1027
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Geeetech/A10M/Configuration_adv.h 查看文件

@@ -1007,13 +1007,7 @@
1007 1007
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1008 1008
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1009 1009
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1010
-  /**
1011
-   * Specify an action command to send to the host on a recovery attempt or failure.
1012
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1013
-   * The host must be configured to handle the action command.
1014
-   */
1015
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1016
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1010
+
1017 1011
 #endif
1018 1012
 
1019 1013
 // @section extras
@@ -2014,32 +2008,23 @@
2014 2008
 #endif
2015 2009
 
2016 2010
 /**
2017
- * Specify an action command to send to the host when the printer is killed.
2018
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2019
- * The host must be configured to handle the action command.
2020
- */
2021
-//#define ACTION_ON_KILL "poweroff"
2022
-
2023
-/**
2024
- * Specify an action command to send to the host on pause and resume.
2025
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2026
- * The host must be configured to handle the action command.
2011
+ * Host Action Commands
2027 2012
  *
2028
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2029
- *                    action while Marlin continues to process G-Code. (M24/M25)
2013
+ * Define host streamer action commands in compliance with the standard.
2030 2014
  *
2031
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2032
- *                    change actions and the host needs to stop sending commands
2033
- *                    until the machine is ready to resume. (M125/M600)
2015
+ * See https://reprap.org/wiki/G-code#Action_commands
2016
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2017
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2034 2018
  *
2035
- *           CANCEL : Instructs the host to abort the print job. Used when the
2036
- *                    print is canceled from the LCD menu.
2019
+ * Some features add reason codes to extend these commands.
2020
+ *
2021
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2022
+ * filament runout and other processes can be managed from the host side.
2037 2023
  */
2038
-//#define ACTION_ON_PAUSE   "pause"
2039
-//#define ACTION_ON_RESUME  "resume"
2040
-//#define ACTION_ON_PAUSED  "paused"
2041
-//#define ACTION_ON_RESUMED "resumed"
2042
-//#define ACTION_ON_CANCEL  "cancel"
2024
+//#define HOST_ACTION_COMMANDS
2025
+#if ENABLED(HOST_ACTION_COMMANDS)
2026
+  //#define HOST_PROMPT_SUPPORT
2027
+#endif
2043 2028
 
2044 2029
 //===========================================================================
2045 2030
 //====================== I2C Position Encoder Settings ======================

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

@@ -1018,20 +1018,10 @@
1018 1018
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1019 1019
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1020 1020
 
1021
-  // Set one or more commands to run on filament runout.
1022
-  //  - Always applies to SD-card printing.
1023
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1021
+  // Set one or more commands to execute on filament runout.
1022
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1024 1023
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1025 1024
 
1026
-  // With this option, if filament runs out during host-based printing, Marlin
1027
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1028
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1029
-  // will be used on filament runout for both host-based and SD-card printing.
1030
-  //
1031
-  // The host must be able to respond to the //action: command set here.
1032
-  //
1033
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1034
-
1035 1025
   // After a runout is detected, continue printing this length of filament
1036 1026
   // before executing the runout script. Useful for a sensor at the end of
1037 1027
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Geeetech/A20M/Configuration_adv.h 查看文件

@@ -1007,13 +1007,7 @@
1007 1007
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1008 1008
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1009 1009
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1010
-  /**
1011
-   * Specify an action command to send to the host on a recovery attempt or failure.
1012
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1013
-   * The host must be configured to handle the action command.
1014
-   */
1015
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1016
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1010
+
1017 1011
 #endif
1018 1012
 
1019 1013
 // @section extras
@@ -2014,32 +2008,23 @@
2014 2008
 #endif
2015 2009
 
2016 2010
 /**
2017
- * Specify an action command to send to the host when the printer is killed.
2018
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2019
- * The host must be configured to handle the action command.
2020
- */
2021
-//#define ACTION_ON_KILL "poweroff"
2022
-
2023
-/**
2024
- * Specify an action command to send to the host on pause and resume.
2025
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2026
- * The host must be configured to handle the action command.
2011
+ * Host Action Commands
2027 2012
  *
2028
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2029
- *                    action while Marlin continues to process G-Code. (M24/M25)
2013
+ * Define host streamer action commands in compliance with the standard.
2030 2014
  *
2031
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2032
- *                    change actions and the host needs to stop sending commands
2033
- *                    until the machine is ready to resume. (M125/M600)
2015
+ * See https://reprap.org/wiki/G-code#Action_commands
2016
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2017
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2034 2018
  *
2035
- *           CANCEL : Instructs the host to abort the print job. Used when the
2036
- *                    print is canceled from the LCD menu.
2019
+ * Some features add reason codes to extend these commands.
2020
+ *
2021
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2022
+ * filament runout and other processes can be managed from the host side.
2037 2023
  */
2038
-//#define ACTION_ON_PAUSE   "pause"
2039
-//#define ACTION_ON_RESUME  "resume"
2040
-//#define ACTION_ON_PAUSED  "paused"
2041
-//#define ACTION_ON_RESUMED "resumed"
2042
-//#define ACTION_ON_CANCEL  "cancel"
2024
+//#define HOST_ACTION_COMMANDS
2025
+#if ENABLED(HOST_ACTION_COMMANDS)
2026
+  //#define HOST_PROMPT_SUPPORT
2027
+#endif
2043 2028
 
2044 2029
 //===========================================================================
2045 2030
 //====================== I2C Position Encoder Settings ======================

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

@@ -1048,20 +1048,10 @@
1048 1048
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1049 1049
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1050 1050
 
1051
-  // Set one or more commands to run on filament runout.
1052
-  //  - Always applies to SD-card printing.
1053
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1051
+  // Set one or more commands to execute on filament runout.
1052
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1054 1053
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1055 1054
 
1056
-  // With this option, if filament runs out during host-based printing, Marlin
1057
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1058
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1059
-  // will be used on filament runout for both host-based and SD-card printing.
1060
-  //
1061
-  // The host must be able to respond to the //action: command set here.
1062
-  //
1063
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1064
-
1065 1055
   // After a runout is detected, continue printing this length of filament
1066 1056
   // before executing the runout script. Useful for a sensor at the end of
1067 1057
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

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

@@ -1033,20 +1033,10 @@
1033 1033
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1034 1034
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1035 1035
 
1036
-  // Set one or more commands to run on filament runout.
1037
-  //  - Always applies to SD-card printing.
1038
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1036
+  // Set one or more commands to execute on filament runout.
1037
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1039 1038
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1040 1039
 
1041
-  // With this option, if filament runs out during host-based printing, Marlin
1042
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1043
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1044
-  // will be used on filament runout for both host-based and SD-card printing.
1045
-  //
1046
-  // The host must be able to respond to the //action: command set here.
1047
-  //
1048
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1049
-
1050 1040
   // After a runout is detected, continue printing this length of filament
1051 1041
   // before executing the runout script. Useful for a sensor at the end of
1052 1042
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

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

@@ -1040,20 +1040,10 @@
1040 1040
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1041 1041
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1042 1042
 
1043
-  // Set one or more commands to run on filament runout.
1044
-  //  - Always applies to SD-card printing.
1045
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1043
+  // Set one or more commands to execute on filament runout.
1044
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1046 1045
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1047 1046
 
1048
-  // With this option, if filament runs out during host-based printing, Marlin
1049
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1050
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1051
-  // will be used on filament runout for both host-based and SD-card printing.
1052
-  //
1053
-  // The host must be able to respond to the //action: command set here.
1054
-  //
1055
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1056
-
1057 1047
   // After a runout is detected, continue printing this length of filament
1058 1048
   // before executing the runout script. Useful for a sensor at the end of
1059 1049
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h 查看文件

@@ -1007,13 +1007,7 @@
1007 1007
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1008 1008
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1009 1009
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1010
-  /**
1011
-   * Specify an action command to send to the host on a recovery attempt or failure.
1012
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1013
-   * The host must be configured to handle the action command.
1014
-   */
1015
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1016
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1010
+
1017 1011
 #endif
1018 1012
 
1019 1013
 // @section extras
@@ -1999,32 +1993,23 @@
1999 1993
 #endif
2000 1994
 
2001 1995
 /**
2002
- * Specify an action command to send to the host when the printer is killed.
2003
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2004
- * The host must be configured to handle the action command.
2005
- */
2006
-//#define ACTION_ON_KILL "poweroff"
2007
-
2008
-/**
2009
- * Specify an action command to send to the host on pause and resume.
2010
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2011
- * The host must be configured to handle the action command.
1996
+ * Host Action Commands
2012 1997
  *
2013
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2014
- *                    action while Marlin continues to process G-Code. (M24/M25)
1998
+ * Define host streamer action commands in compliance with the standard.
2015 1999
  *
2016
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2017
- *                    change actions and the host needs to stop sending commands
2018
- *                    until the machine is ready to resume. (M125/M600)
2000
+ * See https://reprap.org/wiki/G-code#Action_commands
2001
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2002
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2019 2003
  *
2020
- *           CANCEL : Instructs the host to abort the print job. Used when the
2021
- *                    print is canceled from the LCD menu.
2004
+ * Some features add reason codes to extend these commands.
2005
+ *
2006
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2007
+ * filament runout and other processes can be managed from the host side.
2022 2008
  */
2023
-//#define ACTION_ON_PAUSE   "pause"
2024
-//#define ACTION_ON_RESUME  "resume"
2025
-//#define ACTION_ON_PAUSED  "paused"
2026
-//#define ACTION_ON_RESUMED "resumed"
2027
-//#define ACTION_ON_CANCEL  "cancel"
2009
+//#define HOST_ACTION_COMMANDS
2010
+#if ENABLED(HOST_ACTION_COMMANDS)
2011
+  //#define HOST_PROMPT_SUPPORT
2012
+#endif
2028 2013
 
2029 2014
 //===========================================================================
2030 2015
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h 查看文件

@@ -1049,20 +1049,10 @@
1049 1049
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1050 1050
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1051 1051
 
1052
-  // Set one or more commands to run on filament runout.
1053
-  //  - Always applies to SD-card printing.
1054
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1052
+  // Set one or more commands to execute on filament runout.
1053
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1055 1054
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1056 1055
 
1057
-  // With this option, if filament runs out during host-based printing, Marlin
1058
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1059
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1060
-  // will be used on filament runout for both host-based and SD-card printing.
1061
-  //
1062
-  // The host must be able to respond to the //action: command set here.
1063
-  //
1064
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1065
-
1066 1056
   // After a runout is detected, continue printing this length of filament
1067 1057
   // before executing the runout script. Useful for a sensor at the end of
1068 1058
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 2
- 12
Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h 查看文件

@@ -1048,20 +1048,10 @@
1048 1048
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1049 1049
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1050 1050
 
1051
-  // Set one or more commands to run on filament runout.
1052
-  //  - Always applies to SD-card printing.
1053
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1051
+  // Set one or more commands to execute on filament runout.
1052
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1054 1053
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1055 1054
 
1056
-  // With this option, if filament runs out during host-based printing, Marlin
1057
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1058
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1059
-  // will be used on filament runout for both host-based and SD-card printing.
1060
-  //
1061
-  // The host must be able to respond to the //action: command set here.
1062
-  //
1063
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1064
-
1065 1055
   // After a runout is detected, continue printing this length of filament
1066 1056
   // before executing the runout script. Useful for a sensor at the end of
1067 1057
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 2
- 12
Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h 查看文件

@@ -1033,20 +1033,10 @@
1033 1033
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1034 1034
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1035 1035
 
1036
-  // Set one or more commands to run on filament runout.
1037
-  //  - Always applies to SD-card printing.
1038
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1036
+  // Set one or more commands to execute on filament runout.
1037
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1039 1038
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1040 1039
 
1041
-  // With this option, if filament runs out during host-based printing, Marlin
1042
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1043
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1044
-  // will be used on filament runout for both host-based and SD-card printing.
1045
-  //
1046
-  // The host must be able to respond to the //action: command set here.
1047
-  //
1048
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1049
-
1050 1040
   // After a runout is detected, continue printing this length of filament
1051 1041
   // before executing the runout script. Useful for a sensor at the end of
1052 1042
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h 查看文件

@@ -1033,20 +1033,10 @@
1033 1033
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1034 1034
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1035 1035
 
1036
-  // Set one or more commands to run on filament runout.
1037
-  //  - Always applies to SD-card printing.
1038
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1036
+  // Set one or more commands to execute on filament runout.
1037
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1039 1038
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1040 1039
 
1041
-  // With this option, if filament runs out during host-based printing, Marlin
1042
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1043
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1044
-  // will be used on filament runout for both host-based and SD-card printing.
1045
-  //
1046
-  // The host must be able to respond to the //action: command set here.
1047
-  //
1048
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1049
-
1050 1040
   // After a runout is detected, continue printing this length of filament
1051 1041
   // before executing the runout script. Useful for a sensor at the end of
1052 1042
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

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

@@ -1037,20 +1037,10 @@
1037 1037
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1038 1038
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1039 1039
 
1040
-  // Set one or more commands to run on filament runout.
1041
-  //  - Always applies to SD-card printing.
1042
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1040
+  // Set one or more commands to execute on filament runout.
1041
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1043 1042
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1044 1043
 
1045
-  // With this option, if filament runs out during host-based printing, Marlin
1046
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1047
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1048
-  // will be used on filament runout for both host-based and SD-card printing.
1049
-  //
1050
-  // The host must be able to respond to the //action: command set here.
1051
-  //
1052
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1053
-
1054 1044
   // After a runout is detected, continue printing this length of filament
1055 1045
   // before executing the runout script. Useful for a sensor at the end of
1056 1046
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/JGAurora/A5/Configuration.h 查看文件

@@ -1045,20 +1045,10 @@
1045 1045
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1046 1046
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1047 1047
 
1048
-  // Set one or more commands to run on filament runout.
1049
-  //  - Always applies to SD-card printing.
1050
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1048
+  // Set one or more commands to execute on filament runout.
1049
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1051 1050
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1052 1051
 
1053
-  // With this option, if filament runs out during host-based printing, Marlin
1054
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1055
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1056
-  // will be used on filament runout for both host-based and SD-card printing.
1057
-  //
1058
-  // The host must be able to respond to the //action: command set here.
1059
-  //
1060
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1061
-
1062 1052
   // After a runout is detected, continue printing this length of filament
1063 1053
   // before executing the runout script. Useful for a sensor at the end of
1064 1054
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/MakerParts/Configuration.h 查看文件

@@ -1053,20 +1053,10 @@
1053 1053
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1054 1054
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1055 1055
 
1056
-  // Set one or more commands to run on filament runout.
1057
-  //  - Always applies to SD-card printing.
1058
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1056
+  // Set one or more commands to execute on filament runout.
1057
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1059 1058
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1060 1059
 
1061
-  // With this option, if filament runs out during host-based printing, Marlin
1062
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1063
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1064
-  // will be used on filament runout for both host-based and SD-card printing.
1065
-  //
1066
-  // The host must be able to respond to the //action: command set here.
1067
-  //
1068
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1069
-
1070 1060
   // After a runout is detected, continue printing this length of filament
1071 1061
   // before executing the runout script. Useful for a sensor at the end of
1072 1062
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/MakerParts/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

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

@@ -1057,20 +1057,10 @@
1057 1057
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1058 1058
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1059 1059
 
1060
-  // Set one or more commands to run on filament runout.
1061
-  //  - Always applies to SD-card printing.
1062
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1060
+  // Set one or more commands to execute on filament runout.
1061
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1063 1062
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1064 1063
 
1065
-  // With this option, if filament runs out during host-based printing, Marlin
1066
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1067
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1068
-  // will be used on filament runout for both host-based and SD-card printing.
1069
-  //
1070
-  // The host must be able to respond to the //action: command set here.
1071
-  //
1072
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1073
-
1074 1064
   // After a runout is detected, continue printing this length of filament
1075 1065
   // before executing the runout script. Useful for a sensor at the end of
1076 1066
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

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

@@ -1032,20 +1032,10 @@
1032 1032
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1033 1033
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1034 1034
 
1035
-  // Set one or more commands to run on filament runout.
1036
-  //  - Always applies to SD-card printing.
1037
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1035
+  // Set one or more commands to execute on filament runout.
1036
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1038 1037
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1039 1038
 
1040
-  // With this option, if filament runs out during host-based printing, Marlin
1041
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1042
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1043
-  // will be used on filament runout for both host-based and SD-card printing.
1044
-  //
1045
-  // The host must be able to respond to the //action: command set here.
1046
-  //
1047
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1048
-
1049 1039
   // After a runout is detected, continue printing this length of filament
1050 1040
   // before executing the runout script. Useful for a sensor at the end of
1051 1041
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Malyan/M200/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/Micromake/C1/basic/Configuration.h 查看文件

@@ -1037,20 +1037,10 @@
1037 1037
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1038 1038
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1039 1039
 
1040
-  // Set one or more commands to run on filament runout.
1041
-  //  - Always applies to SD-card printing.
1042
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1040
+  // Set one or more commands to execute on filament runout.
1041
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1043 1042
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1044 1043
 
1045
-  // With this option, if filament runs out during host-based printing, Marlin
1046
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1047
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1048
-  // will be used on filament runout for both host-based and SD-card printing.
1049
-  //
1050
-  // The host must be able to respond to the //action: command set here.
1051
-  //
1052
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1053
-
1054 1044
   // After a runout is detected, continue printing this length of filament
1055 1045
   // before executing the runout script. Useful for a sensor at the end of
1056 1046
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 2
- 12
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h 查看文件

@@ -1037,20 +1037,10 @@
1037 1037
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1038 1038
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1039 1039
 
1040
-  // Set one or more commands to run on filament runout.
1041
-  //  - Always applies to SD-card printing.
1042
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1040
+  // Set one or more commands to execute on filament runout.
1041
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1043 1042
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1044 1043
 
1045
-  // With this option, if filament runs out during host-based printing, Marlin
1046
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1047
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1048
-  // will be used on filament runout for both host-based and SD-card printing.
1049
-  //
1050
-  // The host must be able to respond to the //action: command set here.
1051
-  //
1052
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1053
-
1054 1044
   // After a runout is detected, continue printing this length of filament
1055 1045
   // before executing the runout script. Useful for a sensor at the end of
1056 1046
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h 查看文件

@@ -1006,13 +1006,7 @@
1006 1006
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1007 1007
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1008 1008
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1009
-  /**
1010
-   * Specify an action command to send to the host on a recovery attempt or failure.
1011
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1012
-   * The host must be configured to handle the action command.
1013
-   */
1014
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1015
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1009
+
1016 1010
 #endif
1017 1011
 
1018 1012
 // @section extras
@@ -2013,32 +2007,23 @@
2013 2007
 #endif
2014 2008
 
2015 2009
 /**
2016
- * Specify an action command to send to the host when the printer is killed.
2017
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2018
- * The host must be configured to handle the action command.
2019
- */
2020
-//#define ACTION_ON_KILL "poweroff"
2021
-
2022
-/**
2023
- * Specify an action command to send to the host on pause and resume.
2024
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2025
- * The host must be configured to handle the action command.
2010
+ * Host Action Commands
2026 2011
  *
2027
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2028
- *                    action while Marlin continues to process G-Code. (M24/M25)
2012
+ * Define host streamer action commands in compliance with the standard.
2029 2013
  *
2030
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2031
- *                    change actions and the host needs to stop sending commands
2032
- *                    until the machine is ready to resume. (M125/M600)
2014
+ * See https://reprap.org/wiki/G-code#Action_commands
2015
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2016
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2033 2017
  *
2034
- *           CANCEL : Instructs the host to abort the print job. Used when the
2035
- *                    print is canceled from the LCD menu.
2018
+ * Some features add reason codes to extend these commands.
2019
+ *
2020
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2021
+ * filament runout and other processes can be managed from the host side.
2036 2022
  */
2037
-//#define ACTION_ON_PAUSE   "pause"
2038
-//#define ACTION_ON_RESUME  "resume"
2039
-//#define ACTION_ON_PAUSED  "paused"
2040
-//#define ACTION_ON_RESUMED "resumed"
2041
-//#define ACTION_ON_CANCEL  "cancel"
2023
+//#define HOST_ACTION_COMMANDS
2024
+#if ENABLED(HOST_ACTION_COMMANDS)
2025
+  //#define HOST_PROMPT_SUPPORT
2026
+#endif
2042 2027
 
2043 2028
 //===========================================================================
2044 2029
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/Mks/Robin/Configuration.h 查看文件

@@ -1034,20 +1034,10 @@
1034 1034
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1035 1035
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1036 1036
 
1037
-  // Set one or more commands to run on filament runout.
1038
-  //  - Always applies to SD-card printing.
1039
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1037
+  // Set one or more commands to execute on filament runout.
1038
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1040 1039
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1041 1040
 
1042
-  // With this option, if filament runs out during host-based printing, Marlin
1043
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1044
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1045
-  // will be used on filament runout for both host-based and SD-card printing.
1046
-  //
1047
-  // The host must be able to respond to the //action: command set here.
1048
-  //
1049
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1050
-
1051 1041
   // After a runout is detected, continue printing this length of filament
1052 1042
   // before executing the runout script. Useful for a sensor at the end of
1053 1043
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Mks/Robin/Configuration_adv.h 查看文件

@@ -1007,13 +1007,7 @@
1007 1007
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1008 1008
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1009 1009
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1010
-  /**
1011
-   * Specify an action command to send to the host on a recovery attempt or failure.
1012
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1013
-   * The host must be configured to handle the action command.
1014
-   */
1015
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1016
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1010
+
1017 1011
 #endif
1018 1012
 
1019 1013
 // @section extras
@@ -2014,32 +2008,23 @@
2014 2008
 #endif
2015 2009
 
2016 2010
 /**
2017
- * Specify an action command to send to the host when the printer is killed.
2018
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2019
- * The host must be configured to handle the action command.
2020
- */
2021
-//#define ACTION_ON_KILL "poweroff"
2022
-
2023
-/**
2024
- * Specify an action command to send to the host on pause and resume.
2025
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2026
- * The host must be configured to handle the action command.
2011
+ * Host Action Commands
2027 2012
  *
2028
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2029
- *                    action while Marlin continues to process G-Code. (M24/M25)
2013
+ * Define host streamer action commands in compliance with the standard.
2030 2014
  *
2031
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2032
- *                    change actions and the host needs to stop sending commands
2033
- *                    until the machine is ready to resume. (M125/M600)
2015
+ * See https://reprap.org/wiki/G-code#Action_commands
2016
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2017
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2034 2018
  *
2035
- *           CANCEL : Instructs the host to abort the print job. Used when the
2036
- *                    print is canceled from the LCD menu.
2019
+ * Some features add reason codes to extend these commands.
2020
+ *
2021
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2022
+ * filament runout and other processes can be managed from the host side.
2037 2023
  */
2038
-//#define ACTION_ON_PAUSE   "pause"
2039
-//#define ACTION_ON_RESUME  "resume"
2040
-//#define ACTION_ON_PAUSED  "paused"
2041
-//#define ACTION_ON_RESUMED "resumed"
2042
-//#define ACTION_ON_CANCEL  "cancel"
2024
+//#define HOST_ACTION_COMMANDS
2025
+#if ENABLED(HOST_ACTION_COMMANDS)
2026
+  //#define HOST_PROMPT_SUPPORT
2027
+#endif
2043 2028
 
2044 2029
 //===========================================================================
2045 2030
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/Mks/Sbase/Configuration.h 查看文件

@@ -1033,20 +1033,10 @@
1033 1033
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1034 1034
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1035 1035
 
1036
-  // Set one or more commands to run on filament runout.
1037
-  //  - Always applies to SD-card printing.
1038
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1036
+  // Set one or more commands to execute on filament runout.
1037
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1039 1038
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1040 1039
 
1041
-  // With this option, if filament runs out during host-based printing, Marlin
1042
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1043
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1044
-  // will be used on filament runout for both host-based and SD-card printing.
1045
-  //
1046
-  // The host must be able to respond to the //action: command set here.
1047
-  //
1048
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1049
-
1050 1040
   // After a runout is detected, continue printing this length of filament
1051 1041
   // before executing the runout script. Useful for a sensor at the end of
1052 1042
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h 查看文件

@@ -1014,13 +1014,7 @@
1014 1014
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1015 1015
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1016 1016
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1017
-  /**
1018
-   * Specify an action command to send to the host on a recovery attempt or failure.
1019
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1020
-   * The host must be configured to handle the action command.
1021
-   */
1022
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1023
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1017
+
1024 1018
 #endif
1025 1019
 
1026 1020
 // @section extras
@@ -2021,32 +2015,23 @@
2021 2015
 #endif
2022 2016
 
2023 2017
 /**
2024
- * Specify an action command to send to the host when the printer is killed.
2025
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2026
- * The host must be configured to handle the action command.
2027
- */
2028
-//#define ACTION_ON_KILL "poweroff"
2029
-
2030
-/**
2031
- * Specify an action command to send to the host on pause and resume.
2032
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2033
- * The host must be configured to handle the action command.
2018
+ * Host Action Commands
2034 2019
  *
2035
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2036
- *                    action while Marlin continues to process G-Code. (M24/M25)
2020
+ * Define host streamer action commands in compliance with the standard.
2037 2021
  *
2038
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2039
- *                    change actions and the host needs to stop sending commands
2040
- *                    until the machine is ready to resume. (M125/M600)
2022
+ * See https://reprap.org/wiki/G-code#Action_commands
2023
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2024
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2041 2025
  *
2042
- *           CANCEL : Instructs the host to abort the print job. Used when the
2043
- *                    print is canceled from the LCD menu.
2026
+ * Some features add reason codes to extend these commands.
2027
+ *
2028
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2029
+ * filament runout and other processes can be managed from the host side.
2044 2030
  */
2045
-//#define ACTION_ON_PAUSE   "pause"
2046
-//#define ACTION_ON_RESUME  "resume"
2047
-//#define ACTION_ON_PAUSED  "paused"
2048
-//#define ACTION_ON_RESUMED "resumed"
2049
-//#define ACTION_ON_CANCEL  "cancel"
2031
+//#define HOST_ACTION_COMMANDS
2032
+#if ENABLED(HOST_ACTION_COMMANDS)
2033
+  //#define HOST_PROMPT_SUPPORT
2034
+#endif
2050 2035
 
2051 2036
 //===========================================================================
2052 2037
 //====================== I2C Position Encoder Settings ======================

+ 2
- 12
Marlin/src/config/examples/RapideLite/RL200/Configuration.h 查看文件

@@ -1033,20 +1033,10 @@
1033 1033
   #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
1034 1034
   //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.
1035 1035
 
1036
-  // Set one or more commands to run on filament runout.
1037
-  //  - Always applies to SD-card printing.
1038
-  //  - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set.
1036
+  // Set one or more commands to execute on filament runout.
1037
+  // (After 'M412 H' Marlin will ask the host to handle the process.)
1039 1038
   #define FILAMENT_RUNOUT_SCRIPT "M600"
1040 1039
 
1041
-  // With this option, if filament runs out during host-based printing, Marlin
1042
-  // will send "//action:<ACTION_ON_FILAMENT_RUNOUT>" to the host and let the
1043
-  // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT
1044
-  // will be used on filament runout for both host-based and SD-card printing.
1045
-  //
1046
-  // The host must be able to respond to the //action: command set here.
1047
-  //
1048
-  //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout"
1049
-
1050 1040
   // After a runout is detected, continue printing this length of filament
1051 1041
   // before executing the runout script. Useful for a sensor at the end of
1052 1042
   // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.

+ 14
- 29
Marlin/src/config/examples/RapideLite/RL200/Configuration_adv.h 查看文件

@@ -1007,13 +1007,7 @@
1007 1007
   #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1008 1008
   #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1009 1009
   #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
1010
-  /**
1011
-   * Specify an action command to send to the host on a recovery attempt or failure.
1012
-   * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
1013
-   * The host must be configured to handle the action command.
1014
-   */
1015
-  #define G29_ACTION_ON_RECOVER "probe_rewipe"
1016
-  #define G29_ACTION_ON_FAILURE "probe_failed"
1010
+
1017 1011
 #endif
1018 1012
 
1019 1013
 // @section extras
@@ -2014,32 +2008,23 @@
2014 2008
 #endif
2015 2009
 
2016 2010
 /**
2017
- * Specify an action command to send to the host when the printer is killed.
2018
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
2019
- * The host must be configured to handle the action command.
2020
- */
2021
-//#define ACTION_ON_KILL "poweroff"
2022
-
2023
-/**
2024
- * Specify an action command to send to the host on pause and resume.
2025
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
2026
- * The host must be configured to handle the action command.
2011
+ * Host Action Commands
2027 2012
  *
2028
- *   PAUSE / RESUME : Used in non-parking scenarios where the host handles the
2029
- *                    action while Marlin continues to process G-Code. (M24/M25)
2013
+ * Define host streamer action commands in compliance with the standard.
2030 2014
  *
2031
- * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament-
2032
- *                    change actions and the host needs to stop sending commands
2033
- *                    until the machine is ready to resume. (M125/M600)
2015
+ * See https://reprap.org/wiki/G-code#Action_commands
2016
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
2017
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
2034 2018
  *
2035
- *           CANCEL : Instructs the host to abort the print job. Used when the
2036
- *                    print is canceled from the LCD menu.
2019
+ * Some features add reason codes to extend these commands.
2020
+ *
2021
+ * Host Prompt Support enables Marlin to use the host for user prompts so
2022
+ * filament runout and other processes can be managed from the host side.
2037 2023
  */
2038
-//#define ACTION_ON_PAUSE   "pause"
2039
-//#define ACTION_ON_RESUME  "resume"
2040
-//#define ACTION_ON_PAUSED  "paused"
2041
-//#define ACTION_ON_RESUMED "resumed"
2042
-//#define ACTION_ON_CANCEL  "cancel"
2024
+//#define HOST_ACTION_COMMANDS
2025
+#if ENABLED(HOST_ACTION_COMMANDS)
2026
+  //#define HOST_PROMPT_SUPPORT
2027
+#endif
2043 2028
 
2044 2029
 //===========================================================================
2045 2030
 //====================== I2C Position Encoder Settings ======================

+ 0
- 0
Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h 查看文件


部分文件因文件數量過多而無法顯示

Loading…
取消
儲存