From 7f1b69b0c83ae914ed9ae35fdad9f79814069652 Mon Sep 17 00:00:00 2001 From: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Tue, 12 Feb 2019 16:55:47 -0500 Subject: [PATCH] Add HOST_PROMPT_SUPPORT (#13039) --- Marlin/Configuration.h | 14 +- Marlin/Configuration_adv.h | 49 ++---- Marlin/src/HAL/HAL_LPC1768/MarlinSerial.h | 2 - Marlin/src/Marlin.cpp | 119 ++++++++++--- Marlin/src/Marlin.h | 29 +--- Marlin/src/config/default/Configuration.h | 14 +- Marlin/src/config/default/Configuration_adv.h | 49 ++---- .../examples/3DFabXYZ/Migbot/Configuration.h | 14 +- .../3DFabXYZ/Migbot/Configuration_adv.h | 49 ++---- .../AlephObjects/TAZ4/Configuration.h | 14 +- .../AlephObjects/TAZ4/Configuration_adv.h | 49 ++---- .../AliExpress/CL-260/Configuration.h | 14 +- .../config/examples/Anet/A2/Configuration.h | 14 +- .../examples/Anet/A2/Configuration_adv.h | 49 ++---- .../examples/Anet/A2plus/Configuration.h | 14 +- .../examples/Anet/A2plus/Configuration_adv.h | 49 ++---- .../config/examples/Anet/A6/Configuration.h | 14 +- .../examples/Anet/A6/Configuration_adv.h | 49 ++---- .../config/examples/Anet/A8/Configuration.h | 14 +- .../examples/Anet/A8/Configuration_adv.h | 49 ++---- .../examples/AnyCubic/i3/Configuration.h | 14 +- .../examples/AnyCubic/i3/Configuration_adv.h | 49 ++---- .../src/config/examples/ArmEd/Configuration.h | 14 +- .../config/examples/ArmEd/Configuration_adv.h | 49 ++---- .../examples/Azteeg/X5GT/Configuration.h | 14 +- .../BIBO/TouchX/cyclops/Configuration.h | 14 +- .../BIBO/TouchX/cyclops/Configuration_adv.h | 49 ++---- .../BIBO/TouchX/default/Configuration.h | 14 +- .../BIBO/TouchX/default/Configuration_adv.h | 49 ++---- .../examples/BQ/Hephestos/Configuration.h | 14 +- .../examples/BQ/Hephestos/Configuration_adv.h | 49 ++---- .../examples/BQ/Hephestos_2/Configuration.h | 14 +- .../BQ/Hephestos_2/Configuration_adv.h | 49 ++---- .../config/examples/BQ/WITBOX/Configuration.h | 14 +- .../examples/BQ/WITBOX/Configuration_adv.h | 49 ++---- .../config/examples/Cartesio/Configuration.h | 14 +- .../examples/Cartesio/Configuration_adv.h | 49 ++---- .../examples/Creality/CR-10/Configuration.h | 14 +- .../Creality/CR-10/Configuration_adv.h | 49 ++---- .../examples/Creality/CR-10S/Configuration.h | 14 +- .../Creality/CR-10S/Configuration_adv.h | 49 ++---- .../Creality/CR-10mini/Configuration.h | 14 +- .../Creality/CR-10mini/Configuration_adv.h | 49 ++---- .../examples/Creality/CR-8/Configuration.h | 14 +- .../Creality/CR-8/Configuration_adv.h | 49 ++---- .../examples/Creality/Ender-2/Configuration.h | 14 +- .../Creality/Ender-2/Configuration_adv.h | 49 ++---- .../examples/Creality/Ender-3/Configuration.h | 14 +- .../Creality/Ender-3/Configuration_adv.h | 49 ++---- .../examples/Creality/Ender-4/Configuration.h | 14 +- .../Creality/Ender-4/Configuration_adv.h | 49 ++---- .../examples/Einstart-S/Configuration.h | 14 +- .../examples/Einstart-S/Configuration_adv.h | 49 ++---- .../src/config/examples/Felix/Configuration.h | 14 +- .../config/examples/Felix/Configuration_adv.h | 49 ++---- .../examples/Felix/DUAL/Configuration.h | 14 +- .../FlashForge/CreatorPro/Configuration.h | 14 +- .../FlashForge/CreatorPro/Configuration_adv.h | 49 ++---- .../FolgerTech/i3-2020/Configuration.h | 14 +- .../FolgerTech/i3-2020/Configuration_adv.h | 49 ++---- .../examples/Formbot/Raptor/Configuration.h | 14 +- .../Formbot/Raptor/Configuration_adv.h | 49 ++---- .../examples/Formbot/T_Rex_2+/Configuration.h | 14 +- .../Formbot/T_Rex_2+/Configuration_adv.h | 49 ++---- .../examples/Formbot/T_Rex_3/Configuration.h | 14 +- .../Formbot/T_Rex_3/Configuration_adv.h | 49 ++---- .../examples/Geeetech/A10M/Configuration.h | 14 +- .../Geeetech/A10M/Configuration_adv.h | 49 ++---- .../examples/Geeetech/A20M/Configuration.h | 14 +- .../Geeetech/A20M/Configuration_adv.h | 49 ++---- .../examples/Geeetech/GT2560/Configuration.h | 14 +- .../Geeetech/I3_Pro_X-GT2560/Configuration.h | 14 +- .../Geeetech/MeCreator2/Configuration.h | 14 +- .../Geeetech/MeCreator2/Configuration_adv.h | 49 ++---- .../Prusa i3 Pro B/bltouch/Configuration.h | 14 +- .../Prusa i3 Pro B/noprobe/Configuration.h | 14 +- .../Geeetech/Prusa i3 Pro C/Configuration.h | 14 +- .../Prusa i3 Pro C/Configuration_adv.h | 49 ++---- .../Geeetech/Prusa i3 Pro W/Configuration.h | 14 +- .../Prusa i3 Pro W/Configuration_adv.h | 49 ++---- .../examples/Infitary/i3-M508/Configuration.h | 14 +- .../Infitary/i3-M508/Configuration_adv.h | 49 ++---- .../examples/JGAurora/A5/Configuration.h | 14 +- .../examples/JGAurora/A5/Configuration_adv.h | 49 ++---- .../examples/MakerParts/Configuration.h | 14 +- .../examples/MakerParts/Configuration_adv.h | 49 ++---- .../examples/Malyan/M150/Configuration.h | 14 +- .../examples/Malyan/M150/Configuration_adv.h | 49 ++---- .../examples/Malyan/M200/Configuration.h | 14 +- .../examples/Malyan/M200/Configuration_adv.h | 49 ++---- .../Micromake/C1/basic/Configuration.h | 14 +- .../Micromake/C1/enhanced/Configuration.h | 14 +- .../Micromake/C1/enhanced/Configuration_adv.h | 49 ++---- .../config/examples/Mks/Robin/Configuration.h | 14 +- .../examples/Mks/Robin/Configuration_adv.h | 49 ++---- .../config/examples/Mks/Sbase/Configuration.h | 14 +- .../examples/Mks/Sbase/Configuration_adv.h | 49 ++---- .../examples/RapideLite/RL200/Configuration.h | 14 +- .../RapideLite/RL200/Configuration_adv.h | 49 ++---- .../examples/RepRapPro/Huxley/Configuration.h | 14 +- .../RepRapWorld/Megatronics/Configuration.h | 14 +- .../config/examples/RigidBot/Configuration.h | 14 +- .../examples/RigidBot/Configuration_adv.h | 49 ++---- .../src/config/examples/SCARA/Configuration.h | 14 +- .../config/examples/SCARA/Configuration_adv.h | 49 ++---- .../config/examples/STM32F10/Configuration.h | 14 +- .../config/examples/STM32F4/Configuration.h | 14 +- .../examples/Sanguinololu/Configuration.h | 14 +- .../examples/Sanguinololu/Configuration_adv.h | 49 ++---- .../config/examples/TheBorg/Configuration.h | 14 +- .../examples/TheBorg/Configuration_adv.h | 49 ++---- .../config/examples/TinyBoy2/Configuration.h | 14 +- .../examples/TinyBoy2/Configuration_adv.h | 49 ++---- .../config/examples/Tronxy/X1/Configuration.h | 14 +- .../examples/Tronxy/X3A/Configuration.h | 14 +- .../examples/Tronxy/X3A/Configuration_adv.h | 49 ++---- .../examples/Tronxy/X5S/Configuration.h | 14 +- .../examples/Tronxy/XY100/Configuration.h | 14 +- .../UltiMachine/Archim1/Configuration.h | 14 +- .../UltiMachine/Archim1/Configuration_adv.h | 49 ++---- .../UltiMachine/Archim2/Configuration.h | 14 +- .../UltiMachine/Archim2/Configuration_adv.h | 49 ++---- .../examples/VORONDesign/Configuration.h | 14 +- .../examples/VORONDesign/Configuration_adv.h | 49 ++---- .../examples/Velleman/K8200/Configuration.h | 14 +- .../Velleman/K8200/Configuration_adv.h | 49 ++---- .../examples/Velleman/K8400/Configuration.h | 14 +- .../Velleman/K8400/Configuration_adv.h | 49 ++---- .../Velleman/K8400/Dual-head/Configuration.h | 14 +- .../examples/WASP/PowerWASP/Configuration.h | 14 +- .../WASP/PowerWASP/Configuration_adv.h | 49 ++---- .../Wanhao/Duplicator 6/Configuration.h | 14 +- .../Wanhao/Duplicator 6/Configuration_adv.h | 49 ++---- .../examples/adafruit/ST7565/Configuration.h | 14 +- .../delta/Anycubic/Kossel/Configuration.h | 14 +- .../delta/Anycubic/Kossel/Configuration_adv.h | 49 ++---- .../FLSUN/auto_calibrate/Configuration.h | 14 +- .../FLSUN/auto_calibrate/Configuration_adv.h | 49 ++---- .../delta/FLSUN/kossel/Configuration.h | 14 +- .../delta/FLSUN/kossel/Configuration_adv.h | 49 ++---- .../delta/FLSUN/kossel_mini/Configuration.h | 14 +- .../FLSUN/kossel_mini/Configuration_adv.h | 49 ++---- .../Geeetech/Rostock 301/Configuration.h | 14 +- .../Geeetech/Rostock 301/Configuration_adv.h | 49 ++---- .../delta/Hatchbox_Alpha/Configuration.h | 14 +- .../examples/delta/MKS/SBASE/Configuration.h | 14 +- .../delta/MKS/SBASE/Configuration_adv.h | 49 ++---- .../delta/Tevo Little Monster/Configuration.h | 14 +- .../Tevo Little Monster/Configuration_adv.h | 49 ++---- .../examples/delta/generic/Configuration.h | 14 +- .../delta/generic/Configuration_adv.h | 49 ++---- .../delta/kossel_mini/Configuration.h | 14 +- .../delta/kossel_mini/Configuration_adv.h | 49 ++---- .../examples/delta/kossel_pro/Configuration.h | 14 +- .../examples/delta/kossel_xl/Configuration.h | 14 +- .../delta/kossel_xl/Configuration_adv.h | 49 ++---- .../examples/gCreate/gMax1.5+/Configuration.h | 14 +- .../gCreate/gMax1.5+/Configuration_adv.h | 49 ++---- .../config/examples/makibox/Configuration.h | 14 +- .../examples/makibox/Configuration_adv.h | 49 ++---- .../examples/stm32f103ret6/Configuration.h | 14 +- .../examples/tvrrug/Round2/Configuration.h | 14 +- .../tvrrug/Round2/Configuration_adv.h | 49 ++---- .../src/config/examples/wt150/Configuration.h | 14 +- .../config/examples/wt150/Configuration_adv.h | 49 ++---- Marlin/src/feature/emergency_parser.cpp | 4 + Marlin/src/feature/emergency_parser.h | 55 +++++- Marlin/src/feature/host_actions.cpp | 157 ++++++++++++++++++ Marlin/src/feature/host_actions.h | 70 ++++++++ Marlin/src/feature/pause.cpp | 72 +++++++- Marlin/src/feature/prusa_MMU2/mmu2.cpp | 7 + Marlin/src/feature/runout.cpp | 6 +- Marlin/src/feature/runout.h | 40 ++--- Marlin/src/gcode/config/M43.cpp | 7 + Marlin/src/gcode/feature/runout/M412.cpp | 14 +- Marlin/src/gcode/gcode.cpp | 37 +++-- Marlin/src/gcode/gcode.h | 3 + Marlin/src/gcode/host/M115.cpp | 9 +- Marlin/src/gcode/host/M876.cpp | 37 +++++ Marlin/src/gcode/lcd/M0_M1.cpp | 8 + .../sdcard/M20-M30_M32-M34_M524_M928.cpp | 26 ++- Marlin/src/inc/Conditionals_LCD.h | 28 +++- Marlin/src/inc/Conditionals_adv.h | 37 +++++ Marlin/src/lcd/extensible_ui/ui_api.cpp | 5 +- Marlin/src/lcd/menu/menu.cpp | 5 +- Marlin/src/lcd/menu/menu_delta_calibrate.cpp | 3 + Marlin/src/lcd/menu/menu_main.cpp | 17 +- Marlin/src/module/probe.cpp | 3 + buildroot/share/tests/teensy35_tests | 2 +- 189 files changed, 2076 insertions(+), 3479 deletions(-) create mode 100644 Marlin/src/feature/host_actions.cpp create mode 100644 Marlin/src/feature/host_actions.h create mode 100644 Marlin/src/gcode/host/M876.cpp diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 7c9ecf7d0..e9ac0666c 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index f4c09d2ea..be3a13204 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1007,13 +1007,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2014,32 +2008,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/HAL/HAL_LPC1768/MarlinSerial.h b/Marlin/src/HAL/HAL_LPC1768/MarlinSerial.h index 8dc7594ec..ca59a5b72 100644 --- a/Marlin/src/HAL/HAL_LPC1768/MarlinSerial.h +++ b/Marlin/src/HAL/HAL_LPC1768/MarlinSerial.h @@ -54,9 +54,7 @@ public: emergency_parser.update(emergency_state, c); return true; // do not discard character } - #endif - #if ENABLED(EMERGENCY_PARSER) EmergencyParser::State emergency_state; #endif }; diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index b64357a3b..34d0a245b 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -56,6 +56,10 @@ #include "gcode/parser.h" #include "gcode/queue.h" +#if ENABLED(HOST_ACTION_COMMANDS) + #include "feature/host_actions.h" +#endif + #if HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER) #include "libs/buzzer.h" #endif @@ -315,37 +319,98 @@ void disable_all_steppers() { disable_e_steppers(); } -#if HAS_ACTION_COMMANDS +#if ENABLED(FILAMENT_RUNOUT_SENSOR) - void host_action(const char * const pstr, const bool eol=true) { - SERIAL_ECHOPGM("//action:"); - serialprintPGM(pstr); - if (eol) SERIAL_EOL(); + void event_filament_runout() { + + #if ENABLED(ADVANCED_PAUSE_FEATURE) + if (did_pause_print) return; // Action already in progress. Purge triggered repeated runout. + #endif + + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onFilamentRunout(ExtUI::getActiveTool()); + #endif + + const char tool = '0' + #if NUM_RUNOUT_SENSORS > 1 + + active_extruder + #endif + ; + + //action:out_of_filament + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_reason = PROMPT_FILAMENT_RUNOUT; + host_action_prompt_end(); + host_action_prompt_begin(PSTR("FilamentRunout T"), false); + SERIAL_CHAR(tool); + SERIAL_EOL(); + host_action_prompt_show(); + #endif + + #if ENABLED(HOST_ACTION_COMMANDS) + if (!runout.host_handling + && ( strstr(FILAMENT_RUNOUT_SCRIPT, "M600") + || strstr(FILAMENT_RUNOUT_SCRIPT, "M125") + #if ENABLED(ADVANCED_PAUSE_FEATURE) + || strstr(FILAMENT_RUNOUT_SCRIPT, "M25") + #endif + ) + ) { + host_action_paused(false); + } + else { + // Legacy Repetier command for use until newer version supports standard dialog + // To be removed later when pause command also triggers dialog + #ifdef ACTION_ON_FILAMENT_RUNOUT + host_action(PSTR(ACTION_ON_FILAMENT_RUNOUT " T"), false); + SERIAL_CHAR(tool); + SERIAL_EOL(); + #endif + + host_action_pause(false); + } + SERIAL_ECHOPGM(" " ACTION_REASON_ON_FILAMENT_RUNOUT " "); + SERIAL_CHAR(tool); + SERIAL_EOL(); + + #endif // HOST_ACTION_COMMANDS + + if (!runout.host_handling) + enqueue_and_echo_commands_P(PSTR(FILAMENT_RUNOUT_SCRIPT)); } - #ifdef ACTION_ON_KILL - void host_action_kill() { host_action(PSTR(ACTION_ON_KILL)); } - #endif - #ifdef ACTION_ON_PAUSE - void host_action_pause() { host_action(PSTR(ACTION_ON_PAUSE)); } - #endif - #ifdef ACTION_ON_PAUSED - void host_action_paused() { host_action(PSTR(ACTION_ON_PAUSED)); } - #endif - #ifdef ACTION_ON_RESUME - void host_action_resume() { host_action(PSTR(ACTION_ON_RESUME)); } - #endif - #ifdef ACTION_ON_RESUMED - void host_action_resumed() { host_action(PSTR(ACTION_ON_RESUMED)); } - #endif - #ifdef ACTION_ON_CANCEL - void host_action_cancel() { host_action(PSTR(ACTION_ON_CANCEL)); } - #endif - #ifdef ACTION_ON_FILAMENT_RUNOUT - void host_action_filament_runout(const bool eol/*=true*/) { host_action(PSTR(ACTION_ON_FILAMENT_RUNOUT), eol); } - #endif +#endif // FILAMENT_RUNOUT_SENSOR -#endif // HAS_ACTION_COMMANDS +#if ENABLED(G29_RETRY_AND_RECOVER) + + void event_probe_failure() { + #ifdef G29_FAILURE_COMMANDS + process_subcommands_now_P(PSTR(G29_FAILURE_COMMANDS)); + #endif + #ifdef ACTION_ON_G29_FAILURE + host_action(PSTR(ACTION_ON_G29_FAILURE)); } + #endif + #if ENABLED(G29_HALT_ON_FAILURE) + #ifdef ACTION_ON_CANCEL + host_action_cancel(); + #endif + kill(PSTR(MSG_ERR_PROBING_FAILED)); + #endif + } + + void event_probe_recover() { + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying")); + #endif + #ifdef G29_RECOVER_COMMANDS + process_subcommands_now_P(PSTR(G29_RECOVER_COMMANDS)); + #endif + #ifdef ACTION_ON_G29_RECOVER + host_action(PSTR(ACTION_ON_G29_RECOVER)); + #endif + } + +#endif /** * Manage several activities: diff --git a/Marlin/src/Marlin.h b/Marlin/src/Marlin.h index 260077c65..aa48af9b9 100644 --- a/Marlin/src/Marlin.h +++ b/Marlin/src/Marlin.h @@ -370,26 +370,11 @@ void protected_pin_err(); inline void suicide() { OUT_WRITE(SUICIDE_PIN, LOW); } #endif -#if HAS_ACTION_COMMANDS - #ifdef ACTION_ON_KILL - void host_action_kill(); - #endif - #ifdef ACTION_ON_PAUSE - void host_action_pause(); - #endif - #ifdef ACTION_ON_PAUSED - void host_action_paused(); - #endif - #ifdef ACTION_ON_RESUME - void host_action_resume(); - #endif - #ifdef ACTION_ON_RESUMED - void host_action_resumed(); - #endif - #ifdef ACTION_ON_CANCEL - void host_action_cancel(); - #endif - #ifdef ACTION_ON_FILAMENT_RUNOUT - void host_action_filament_runout(const bool eol=true); - #endif +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + void event_filament_runout(); +#endif + +#if ENABLED(G29_RETRY_AND_RECOVER) + void event_probe_recover(); + void event_probe_failure(); #endif diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h index 7c9ecf7d0..e9ac0666c 100644 --- a/Marlin/src/config/default/Configuration.h +++ b/Marlin/src/config/default/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index f4c09d2ea..be3a13204 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -1007,13 +1007,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2014,32 +2008,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration.h b/Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration.h index ad3884e43..b9b689fd5 100644 --- a/Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration.h +++ b/Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration.h @@ -1039,20 +1039,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration_adv.h b/Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration_adv.h index 56315b0b6..ef2eb0d11 100644 --- a/Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration_adv.h +++ b/Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration_adv.h @@ -1007,13 +1007,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2016,32 +2010,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h index 4efd2d498..cd49d04f4 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h @@ -1053,20 +1053,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index feb643011..f643ea33b 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h index 0aebc3ec8..67a7b892d 100644 --- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h +++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Anet/A2/Configuration.h b/Marlin/src/config/examples/Anet/A2/Configuration.h index e51e61674..c9caefaf5 100644 --- a/Marlin/src/config/examples/Anet/A2/Configuration.h +++ b/Marlin/src/config/examples/Anet/A2/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Anet/A2/Configuration_adv.h b/Marlin/src/config/examples/Anet/A2/Configuration_adv.h index 9c9fd24bc..fcb53e180 100644 --- a/Marlin/src/config/examples/Anet/A2/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A2/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Anet/A2plus/Configuration.h b/Marlin/src/config/examples/Anet/A2plus/Configuration.h index e29a0e9a1..63f90e51a 100644 --- a/Marlin/src/config/examples/Anet/A2plus/Configuration.h +++ b/Marlin/src/config/examples/Anet/A2plus/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h b/Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h index 9c9fd24bc..fcb53e180 100644 --- a/Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h index 0e7ef45ac..ac9917c7d 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration.h @@ -1147,20 +1147,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index bf5b72d53..afa667720 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -1005,13 +1005,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2012,32 +2006,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h index 0b219832a..c3476d36e 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration.h @@ -1046,20 +1046,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 9e3912a14..72fb0fded 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/AnyCubic/i3/Configuration.h b/Marlin/src/config/examples/AnyCubic/i3/Configuration.h index a54a036c2..7d8c7a243 100644 --- a/Marlin/src/config/examples/AnyCubic/i3/Configuration.h +++ b/Marlin/src/config/examples/AnyCubic/i3/Configuration.h @@ -1043,20 +1043,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/AnyCubic/i3/Configuration_adv.h b/Marlin/src/config/examples/AnyCubic/i3/Configuration_adv.h index bca747492..7e381ec18 100644 --- a/Marlin/src/config/examples/AnyCubic/i3/Configuration_adv.h +++ b/Marlin/src/config/examples/AnyCubic/i3/Configuration_adv.h @@ -1007,13 +1007,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/ArmEd/Configuration.h b/Marlin/src/config/examples/ArmEd/Configuration.h index 07af3d840..e986ecf09 100644 --- a/Marlin/src/config/examples/ArmEd/Configuration.h +++ b/Marlin/src/config/examples/ArmEd/Configuration.h @@ -1034,20 +1034,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/ArmEd/Configuration_adv.h b/Marlin/src/config/examples/ArmEd/Configuration_adv.h index 73cdabbbf..03413a3c9 100644 --- a/Marlin/src/config/examples/ArmEd/Configuration_adv.h +++ b/Marlin/src/config/examples/ArmEd/Configuration_adv.h @@ -1011,13 +1011,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2018,32 +2012,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h index 5e22f8b89..5d2803d46 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h index 548381b8e..49fde0416 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h index 1674a9cd8..421a9db03 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h @@ -1005,13 +1005,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2012,32 +2006,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h index ba372bd5e..c543d4de7 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h index 886589feb..a836beca1 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h index aef2278a4..29ced61ad 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h @@ -1021,20 +1021,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index 1f59bacbe..35d84d439 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h index 6ed587fcd..d42bea2d2 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h index 5c7233c91..558dc95a1 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -1014,13 +1014,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2021,32 +2015,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h index 4262647f6..828eb306c 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h @@ -1021,20 +1021,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index 1f59bacbe..35d84d439 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Cartesio/Configuration.h b/Marlin/src/config/examples/Cartesio/Configuration.h index 2cbd124d1..ef4199006 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration.h +++ b/Marlin/src/config/examples/Cartesio/Configuration.h @@ -1032,20 +1032,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index 0679bf090..297d62b79 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h index 0e2a47c3e..3d1ca6c16 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h @@ -1043,20 +1043,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h index 8f1f2a31c..a5c5d03e9 100644 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2016,32 +2010,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h index 7ec064e99..28fe01fbf 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h @@ -1034,20 +1034,10 @@ //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. #define FIL_RUNOUT_PIN 2 // Creality CR10-S stock sensor - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h index 4e2a7403c..9d60b9502 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h b/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h index 3c4f82495..9a996088a 100644 --- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h @@ -1052,20 +1052,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h index d5126da86..23781758c 100644 --- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Creality/CR-8/Configuration.h b/Marlin/src/config/examples/Creality/CR-8/Configuration.h index e07fda7b3..8188a6736 100644 --- a/Marlin/src/config/examples/Creality/CR-8/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-8/Configuration.h @@ -1043,20 +1043,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h index db440edc0..116ebb039 100644 --- a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Creality/Ender-2/Configuration.h b/Marlin/src/config/examples/Creality/Ender-2/Configuration.h index 0d073eafb..2737ef355 100644 --- a/Marlin/src/config/examples/Creality/Ender-2/Configuration.h +++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration.h @@ -1037,20 +1037,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h index 15587a0cb..ccff738e4 100644 --- a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Creality/Ender-3/Configuration.h b/Marlin/src/config/examples/Creality/Ender-3/Configuration.h index 84b9aa68b..339ccbb97 100644 --- a/Marlin/src/config/examples/Creality/Ender-3/Configuration.h +++ b/Marlin/src/config/examples/Creality/Ender-3/Configuration.h @@ -1037,20 +1037,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h index 6a5ef2327..08302ee19 100644 --- a/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Creality/Ender-4/Configuration.h b/Marlin/src/config/examples/Creality/Ender-4/Configuration.h index 8a543da73..4b3b3b8df 100644 --- a/Marlin/src/config/examples/Creality/Ender-4/Configuration.h +++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration.h @@ -1043,20 +1043,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h index 5ce351272..2ecfa5d67 100644 --- a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Einstart-S/Configuration.h b/Marlin/src/config/examples/Einstart-S/Configuration.h index 97a37074b..bc2cf97ff 100644 --- a/Marlin/src/config/examples/Einstart-S/Configuration.h +++ b/Marlin/src/config/examples/Einstart-S/Configuration.h @@ -1043,20 +1043,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Einstart-S/Configuration_adv.h b/Marlin/src/config/examples/Einstart-S/Configuration_adv.h index 406865a04..52f992d28 100644 --- a/Marlin/src/config/examples/Einstart-S/Configuration_adv.h +++ b/Marlin/src/config/examples/Einstart-S/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h index e89604d0d..8d7a03c8d 100644 --- a/Marlin/src/config/examples/Felix/Configuration.h +++ b/Marlin/src/config/examples/Felix/Configuration.h @@ -1015,20 +1015,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index ae44eb171..c5df9862b 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h index 15792b919..48a72b061 100644 --- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h +++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h @@ -1015,20 +1015,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/FlashForge/CreatorPro/Configuration.h b/Marlin/src/config/examples/FlashForge/CreatorPro/Configuration.h index cda79ca7e..5a683e556 100644 --- a/Marlin/src/config/examples/FlashForge/CreatorPro/Configuration.h +++ b/Marlin/src/config/examples/FlashForge/CreatorPro/Configuration.h @@ -1026,20 +1026,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/FlashForge/CreatorPro/Configuration_adv.h b/Marlin/src/config/examples/FlashForge/CreatorPro/Configuration_adv.h index c385919e2..55c275139 100644 --- a/Marlin/src/config/examples/FlashForge/CreatorPro/Configuration_adv.h +++ b/Marlin/src/config/examples/FlashForge/CreatorPro/Configuration_adv.h @@ -1005,13 +1005,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2012,32 +2006,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h index 24a34b13f..14a92f232 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h @@ -1039,20 +1039,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h index db699ba02..b51d2a292 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Formbot/Raptor/Configuration.h b/Marlin/src/config/examples/Formbot/Raptor/Configuration.h index 44a06f0cc..01b87ac31 100644 --- a/Marlin/src/config/examples/Formbot/Raptor/Configuration.h +++ b/Marlin/src/config/examples/Formbot/Raptor/Configuration.h @@ -1131,20 +1131,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h b/Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h index 248d25d6f..24964e9e5 100644 --- a/Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h +++ b/Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h @@ -1008,13 +1008,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2017,32 +2011,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -#define ACTION_ON_PAUSE "pause" -#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h b/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h index 0cf4597cb..0cfdf956e 100644 --- a/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h +++ b/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h @@ -1063,20 +1063,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h b/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h index 9f9dc4de3..93839bb01 100644 --- a/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h +++ b/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h @@ -1011,13 +1011,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2018,32 +2012,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -#define ACTION_ON_PAUSE "pause" -#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h b/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h index 6f267b82a..7006fc865 100644 --- a/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h +++ b/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h @@ -1058,20 +1058,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h b/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h index 6d96a5cb1..be2d5609b 100644 --- a/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h +++ b/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h @@ -1011,13 +1011,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -#define ACTION_ON_PAUSE "pause" -#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Geeetech/A10M/Configuration.h b/Marlin/src/config/examples/Geeetech/A10M/Configuration.h index 91965b299..b83bafde2 100644 --- a/Marlin/src/config/examples/Geeetech/A10M/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/A10M/Configuration.h @@ -1018,20 +1018,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Geeetech/A10M/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/A10M/Configuration_adv.h index 3d3d8829a..8ec3b72b7 100644 --- a/Marlin/src/config/examples/Geeetech/A10M/Configuration_adv.h +++ b/Marlin/src/config/examples/Geeetech/A10M/Configuration_adv.h @@ -1007,13 +1007,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2014,32 +2008,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Geeetech/A20M/Configuration.h b/Marlin/src/config/examples/Geeetech/A20M/Configuration.h index 13ec1c766..ccb2813a9 100644 --- a/Marlin/src/config/examples/Geeetech/A20M/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/A20M/Configuration.h @@ -1018,20 +1018,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Geeetech/A20M/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/A20M/Configuration_adv.h index f7ad93c60..a7f0b8fa3 100644 --- a/Marlin/src/config/examples/Geeetech/A20M/Configuration_adv.h +++ b/Marlin/src/config/examples/Geeetech/A20M/Configuration_adv.h @@ -1007,13 +1007,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2014,32 +2008,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h index ecf8cbede..c5760fa4f 100644 --- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h @@ -1048,20 +1048,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h index a04cdc227..defc53224 100644 --- a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h b/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h index 9c46c823f..902bc89d1 100644 --- a/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h @@ -1040,20 +1040,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h index 3b14b5a79..787517f1b 100644 --- a/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h +++ b/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h @@ -1007,13 +1007,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -1999,32 +1993,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h index 6a305e0db..111c835b8 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h @@ -1049,20 +1049,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h index 50c016bc8..274084212 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h @@ -1048,20 +1048,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h index 316521411..19c485b17 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h index 101468877..b712b4947 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h index 775370fdc..3dc805822 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h index 101468877..b712b4947 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h index 8beb94875..2f5fccaa1 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h @@ -1037,20 +1037,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h index b4a71b2d7..33b4c1711 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration.h b/Marlin/src/config/examples/JGAurora/A5/Configuration.h index d111ef981..6a0a4ba3c 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration.h @@ -1045,20 +1045,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h index 3d3ea19e4..e0b526e57 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/MakerParts/Configuration.h b/Marlin/src/config/examples/MakerParts/Configuration.h index cbfc5233b..f8202fac2 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration.h +++ b/Marlin/src/config/examples/MakerParts/Configuration.h @@ -1053,20 +1053,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h index 5da624798..3df7ae071 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h +++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration.h b/Marlin/src/config/examples/Malyan/M150/Configuration.h index 2f3c79909..4872c3355 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration.h @@ -1057,20 +1057,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index bc27641e1..dc414c45d 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration.h b/Marlin/src/config/examples/Malyan/M200/Configuration.h index 7c7c6b4c5..bba8cd5e8 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration.h @@ -1032,20 +1032,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h index dd68a4819..780d1d567 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h index d2ff8501b..847cbf84d 100644 --- a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h @@ -1037,20 +1037,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h index 3d2d0fba3..bab117890 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h @@ -1037,20 +1037,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h index e8996228e..e08503a11 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Mks/Robin/Configuration.h b/Marlin/src/config/examples/Mks/Robin/Configuration.h index f96cb4542..0fff472f0 100644 --- a/Marlin/src/config/examples/Mks/Robin/Configuration.h +++ b/Marlin/src/config/examples/Mks/Robin/Configuration.h @@ -1034,20 +1034,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Mks/Robin/Configuration_adv.h b/Marlin/src/config/examples/Mks/Robin/Configuration_adv.h index 1b87a17e8..59821a35e 100644 --- a/Marlin/src/config/examples/Mks/Robin/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Robin/Configuration_adv.h @@ -1007,13 +1007,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2014,32 +2008,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h index a3f95265b..f835e98bb 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index 7490f8f75..51631886e 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -1014,13 +1014,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2021,32 +2015,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/RapideLite/RL200/Configuration.h b/Marlin/src/config/examples/RapideLite/RL200/Configuration.h index 55fcb7fc9..f9975e37d 100644 --- a/Marlin/src/config/examples/RapideLite/RL200/Configuration.h +++ b/Marlin/src/config/examples/RapideLite/RL200/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/RapideLite/RL200/Configuration_adv.h b/Marlin/src/config/examples/RapideLite/RL200/Configuration_adv.h index 4c67a9c28..bd235272a 100644 --- a/Marlin/src/config/examples/RapideLite/RL200/Configuration_adv.h +++ b/Marlin/src/config/examples/RapideLite/RL200/Configuration_adv.h @@ -1007,13 +1007,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2014,32 +2008,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h b/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h index 219de0ae4..ed3087c68 100644 --- a/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h +++ b/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h @@ -1082,20 +1082,10 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h index 6ad218e33..f8c59ae70 100644 --- a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h index 6fbae9f4b..f23f30441 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration.h +++ b/Marlin/src/config/examples/RigidBot/Configuration.h @@ -1031,20 +1031,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index 48d143193..10963c382 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h index da67a7d71..01fa37759 100644 --- a/Marlin/src/config/examples/SCARA/Configuration.h +++ b/Marlin/src/config/examples/SCARA/Configuration.h @@ -1046,20 +1046,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index 5a293041a..bd684e8af 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/STM32F10/Configuration.h b/Marlin/src/config/examples/STM32F10/Configuration.h index afa5970e0..c00d66f7d 100644 --- a/Marlin/src/config/examples/STM32F10/Configuration.h +++ b/Marlin/src/config/examples/STM32F10/Configuration.h @@ -1035,20 +1035,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/STM32F4/Configuration.h b/Marlin/src/config/examples/STM32F4/Configuration.h index 376ea3585..8429742bd 100644 --- a/Marlin/src/config/examples/STM32F4/Configuration.h +++ b/Marlin/src/config/examples/STM32F4/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h index bd88421aa..d4af4aa05 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h @@ -1064,20 +1064,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index 4b7c0b3ff..757b3b9d9 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/TheBorg/Configuration.h b/Marlin/src/config/examples/TheBorg/Configuration.h index b121512e2..f342cfdaa 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration.h +++ b/Marlin/src/config/examples/TheBorg/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h index 6d11b4e72..b45c23ace 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h +++ b/Marlin/src/config/examples/TheBorg/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration.h b/Marlin/src/config/examples/TinyBoy2/Configuration.h index 62932901f..0117848db 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h @@ -1089,20 +1089,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index b89828f5f..7822b9efa 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Tronxy/X1/Configuration.h b/Marlin/src/config/examples/Tronxy/X1/Configuration.h index b3a21715f..a7f711cd8 100644 --- a/Marlin/src/config/examples/Tronxy/X1/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X1/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Tronxy/X3A/Configuration.h b/Marlin/src/config/examples/Tronxy/X3A/Configuration.h index 2ace84cef..6248bf3dd 100644 --- a/Marlin/src/config/examples/Tronxy/X3A/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X3A/Configuration.h @@ -1037,20 +1037,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h b/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h index 78a3c9502..127dfc897 100644 --- a/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h +++ b/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h index 059cc396e..4bc9c8469 100644 --- a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h @@ -1032,20 +1032,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h index b712be4da..38a5a1694 100644 --- a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h @@ -1044,20 +1044,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/UltiMachine/Archim1/Configuration.h b/Marlin/src/config/examples/UltiMachine/Archim1/Configuration.h index f232ba174..a22fa2cc6 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim1/Configuration.h +++ b/Marlin/src/config/examples/UltiMachine/Archim1/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h index 315f79ee7..0fb6d03a1 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h @@ -1007,13 +1007,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2014,32 +2008,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h index 55b97ebb8..eabb31ef8 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h index 901041339..7c4927c22 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/VORONDesign/Configuration.h b/Marlin/src/config/examples/VORONDesign/Configuration.h index 243908a38..1db4a7c59 100644 --- a/Marlin/src/config/examples/VORONDesign/Configuration.h +++ b/Marlin/src/config/examples/VORONDesign/Configuration.h @@ -1042,20 +1042,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/VORONDesign/Configuration_adv.h b/Marlin/src/config/examples/VORONDesign/Configuration_adv.h index 5229576db..f6270ab2c 100644 --- a/Marlin/src/config/examples/VORONDesign/Configuration_adv.h +++ b/Marlin/src/config/examples/VORONDesign/Configuration_adv.h @@ -1007,13 +1007,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2014,32 +2008,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h index 2309ab920..3e64081bb 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h @@ -1063,20 +1063,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index f0f9149de..892a4c6ce 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -1019,13 +1019,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2026,32 +2020,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h index 614a55a88..79a4e73de 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index e1180c690..80333f751 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h index f9a5fadf3..eaccacfed 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/WASP/PowerWASP/Configuration.h b/Marlin/src/config/examples/WASP/PowerWASP/Configuration.h index fd0d1d06e..1256eff16 100644 --- a/Marlin/src/config/examples/WASP/PowerWASP/Configuration.h +++ b/Marlin/src/config/examples/WASP/PowerWASP/Configuration.h @@ -1052,20 +1052,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/WASP/PowerWASP/Configuration_adv.h b/Marlin/src/config/examples/WASP/PowerWASP/Configuration_adv.h index 762f43aa6..36fd25c21 100644 --- a/Marlin/src/config/examples/WASP/PowerWASP/Configuration_adv.h +++ b/Marlin/src/config/examples/WASP/PowerWASP/Configuration_adv.h @@ -1007,13 +1007,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2014,32 +2008,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h index 5665e7301..6aba140e0 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h @@ -1043,20 +1043,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index c4b2b5679..3d3ad0a6b 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -1008,13 +1008,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2015,32 +2009,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h index 1c3f72d47..fd10f96a8 100644 --- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h +++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h @@ -1033,20 +1033,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration.h b/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration.h index ad22a0886..ca1be14cc 100644 --- a/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration.h +++ b/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration.h @@ -1221,20 +1221,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h index 5e14290fe..3be0296ef 100644 --- a/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h @@ -1008,13 +1008,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2015,32 +2009,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h index af485c3f9..383679ed3 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -1161,20 +1161,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index 3590044d7..930fc4779 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -1008,13 +1008,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2015,32 +2009,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h index b0e0a7fbd..d736fd662 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h @@ -1160,20 +1160,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h index 3590044d7..930fc4779 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -1008,13 +1008,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2015,32 +2009,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h index 33849dbbb..848b7d1a2 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -1160,20 +1160,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index 2b73fe3ca..aaedf1e66 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -1008,13 +1008,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2015,32 +2009,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration.h b/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration.h index bd6813546..a5096665c 100644 --- a/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration.h +++ b/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration.h @@ -1151,20 +1151,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h b/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h index 87d21f66a..efd3dfc11 100644 --- a/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h @@ -1009,13 +1009,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2016,32 +2010,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h b/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h index fd768e002..02a187566 100644 --- a/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h +++ b/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h @@ -1163,20 +1163,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/delta/MKS/SBASE/Configuration.h b/Marlin/src/config/examples/delta/MKS/SBASE/Configuration.h index 19e2c6a1c..3d77f1215 100644 --- a/Marlin/src/config/examples/delta/MKS/SBASE/Configuration.h +++ b/Marlin/src/config/examples/delta/MKS/SBASE/Configuration.h @@ -1148,20 +1148,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/delta/MKS/SBASE/Configuration_adv.h b/Marlin/src/config/examples/delta/MKS/SBASE/Configuration_adv.h index 5f8722ab8..f501a0863 100644 --- a/Marlin/src/config/examples/delta/MKS/SBASE/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/MKS/SBASE/Configuration_adv.h @@ -1008,13 +1008,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2015,32 +2009,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration.h b/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration.h index f1bc3a7ab..23f125243 100644 --- a/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration.h +++ b/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration.h @@ -1152,20 +1152,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h b/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h index 6bff3694d..3545b2431 100644 --- a/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h @@ -1008,13 +1008,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2003,32 +1997,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h index 6cce3e313..0fd482519 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration.h +++ b/Marlin/src/config/examples/delta/generic/Configuration.h @@ -1148,20 +1148,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index 2b73fe3ca..aaedf1e66 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -1008,13 +1008,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2015,32 +2009,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h index 402f996ae..1daaf27cd 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -1150,20 +1150,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h index 673d244ab..64c7e312d 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -1007,13 +1007,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2014,32 +2008,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h index c65be8ad1..de07fe9da 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h @@ -1151,20 +1151,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h index 0be57ab5f..42a6fde20 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h @@ -1151,20 +1151,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h index d1d6c94d0..a1d9399fe 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -1008,13 +1008,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2015,32 +2009,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h index cda6f83b6..15d8952d4 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h @@ -1047,20 +1047,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h index 98ab0b81a..5cf0a6472 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h index 598def698..ed854867a 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -1036,20 +1036,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index 051ef39c7..1f84938cf 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/stm32f103ret6/Configuration.h b/Marlin/src/config/examples/stm32f103ret6/Configuration.h index 39bbb7374..6d8f3e004 100644 --- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h +++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h @@ -1035,20 +1035,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h index 60aa4fa92..74f24cabb 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h @@ -1028,20 +1028,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index 8a4bb603e..b44115b77 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -1006,13 +1006,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2013,32 +2007,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/config/examples/wt150/Configuration.h b/Marlin/src/config/examples/wt150/Configuration.h index 880bed605..74eb7b791 100644 --- a/Marlin/src/config/examples/wt150/Configuration.h +++ b/Marlin/src/config/examples/wt150/Configuration.h @@ -1038,20 +1038,10 @@ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. - // Set one or more commands to run on filament runout. - // - Always applies to SD-card printing. - // - Applies to host-based printing if ACTION_ON_FILAMENT_RUNOUT is not set. + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) #define FILAMENT_RUNOUT_SCRIPT "M600" - // With this option, if filament runs out during host-based printing, Marlin - // will send "//action:" to the host and let the - // host handle filament change. If left undefined the FILAMENT_RUNOUT_SCRIPT - // will be used on filament runout for both host-based and SD-card printing. - // - // The host must be able to respond to the //action: command set here. - // - //#define ACTION_ON_FILAMENT_RUNOUT "pause: filament_runout" - // After a runout is detected, continue printing this length of filament // before executing the runout script. Useful for a sensor at the end of // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index 3af0e4fdb..52c9286be 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -1007,13 +1007,7 @@ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" #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" - /** - * Specify an action command to send to the host on a recovery attempt or failure. - * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'. - * The host must be configured to handle the action command. - */ - #define G29_ACTION_ON_RECOVER "probe_rewipe" - #define G29_ACTION_ON_FAILURE "probe_failed" + #endif // @section extras @@ -2014,32 +2008,23 @@ #endif /** - * Specify an action command to send to the host when the printer is killed. - * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'. - * The host must be configured to handle the action command. + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. */ -//#define ACTION_ON_KILL "poweroff" - -/** - * Specify an action command to send to the host on pause and resume. - * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'. - * The host must be configured to handle the action command. - * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) - * - * PAUSED / RESUMED : Used in scenarios where Marlin handles pause and filament- - * change actions and the host needs to stop sending commands - * until the machine is ready to resume. (M125/M600) - * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. - */ -//#define ACTION_ON_PAUSE "pause" -//#define ACTION_ON_RESUME "resume" -//#define ACTION_ON_PAUSED "paused" -//#define ACTION_ON_RESUMED "resumed" -//#define ACTION_ON_CANCEL "cancel" +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif //=========================================================================== //====================== I2C Position Encoder Settings ====================== diff --git a/Marlin/src/feature/emergency_parser.cpp b/Marlin/src/feature/emergency_parser.cpp index fc8e2ef62..6840c8255 100644 --- a/Marlin/src/feature/emergency_parser.cpp +++ b/Marlin/src/feature/emergency_parser.cpp @@ -34,6 +34,10 @@ bool EmergencyParser::killed_by_M112, // = false EmergencyParser::enabled; +#if ENABLED(HOST_PROMPT_SUPPORT) + uint8_t EmergencyParser::M876_reason; // = 0 +#endif + // Global instance EmergencyParser emergency_parser; diff --git a/Marlin/src/feature/emergency_parser.h b/Marlin/src/feature/emergency_parser.h index b7617ae8c..5494ffda0 100644 --- a/Marlin/src/feature/emergency_parser.h +++ b/Marlin/src/feature/emergency_parser.h @@ -27,15 +27,20 @@ #define FORCE_INLINE __attribute__((always_inline)) inline +#if ENABLED(HOST_PROMPT_SUPPORT) + #include "host_actions.h" +#endif + // External references extern volatile bool wait_for_user, wait_for_heatup; void quickstop_stepper(); +void host_response_handler(const uint8_t response); class EmergencyParser { public: - // Currently looking for: M108, M112, M410 + // Currently looking for: M108, M112, M410, M876 enum State : char { EP_RESET, EP_N, @@ -48,11 +53,22 @@ public: EP_M4, EP_M41, EP_M410, + #if ENABLED(HOST_PROMPT_SUPPORT) + EP_M8, + EP_M87, + EP_M876, + EP_M876S, + EP_M876SN, + #endif EP_IGNORE // to '\n' }; static bool killed_by_M112; + #if ENABLED(HOST_PROMPT_SUPPORT) + static uint8_t M876_reason; + #endif + EmergencyParser() { enable(); } FORCE_INLINE static void enable() { enabled = true; } @@ -86,6 +102,9 @@ public: case ' ': break; case '1': state = EP_M1; break; case '4': state = EP_M4; break; + #if ENABLED(HOST_PROMPT_SUPPORT) + case '8': state = EP_M8; break; + #endif default: state = EP_IGNORE; } break; @@ -114,6 +133,37 @@ public: state = (c == '0') ? EP_M410 : EP_IGNORE; break; + #if ENABLED(HOST_PROMPT_SUPPORT) + case EP_M8: + state = (c == '7') ? EP_M87 : EP_IGNORE; + break; + + case EP_M87: + state = (c == '6') ? EP_M876 : EP_IGNORE; + break; + + case EP_M876: + switch(c) { + case ' ': break; + case 'S': state = EP_M876S; break; + default: state = EP_IGNORE; break; + } + break; + + case EP_M876S: + switch (c) { + case ' ': break; + case '0': case '1': case '2': + case '3': case '4': case '5': + case '6': case '7': case '8': + case '9': + state = EP_M876SN; + M876_reason = (uint8_t)(c - '0'); + break; + } + break; + #endif + case EP_IGNORE: if (c == '\n') state = EP_RESET; break; @@ -124,6 +174,9 @@ public: case EP_M108: wait_for_user = wait_for_heatup = false; break; case EP_M112: killed_by_M112 = true; break; case EP_M410: quickstop_stepper(); break; + #if ENABLED(HOST_PROMPT_SUPPORT) + case EP_M876SN: host_response_handler(M876_reason); break; + #endif default: break; } state = EP_RESET; diff --git a/Marlin/src/feature/host_actions.cpp b/Marlin/src/feature/host_actions.cpp new file mode 100644 index 000000000..59297af5f --- /dev/null +++ b/Marlin/src/feature/host_actions.cpp @@ -0,0 +1,157 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../inc/MarlinConfig.h" + +#if ENABLED(HOST_ACTION_COMMANDS) + +#include "host_actions.h" + +//#define DEBUG_HOST_ACTIONS + +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #include "pause.h" + #include "../gcode/queue.h" +#endif + +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + #include "runout.h" +#endif + +extern volatile bool wait_for_user; + +void host_action(const char * const pstr, const bool eol) { + SERIAL_ECHOPGM("//action:"); + serialprintPGM(pstr); + if (eol) SERIAL_EOL(); +} + +#ifdef ACTION_ON_KILL + void host_action_kill() { host_action(PSTR(ACTION_ON_KILL)); } +#endif +#ifdef ACTION_ON_PAUSE + void host_action_pause(const bool eol/*=true*/) { host_action(PSTR(ACTION_ON_PAUSE), eol); } +#endif +#ifdef ACTION_ON_PAUSED + void host_action_paused(const bool eol/*=true*/) { host_action(PSTR(ACTION_ON_PAUSED), eol); } +#endif +#ifdef ACTION_ON_RESUME + void host_action_resume() { host_action(PSTR(ACTION_ON_RESUME)); } +#endif +#ifdef ACTION_ON_RESUMED + void host_action_resumed() { host_action(PSTR(ACTION_ON_RESUMED)); } +#endif +#ifdef ACTION_ON_CANCEL + void host_action_cancel() { host_action(PSTR(ACTION_ON_CANCEL)); } +#endif + +#if ENABLED(HOST_PROMPT_SUPPORT) + + PromptReason host_prompt_reason = PROMPT_NOT_DEFINED; + + void host_action_prompt(const char * const ptype, const bool eol=true) { + host_action(PSTR("prompt_"), false); + serialprintPGM(ptype); + if (eol) SERIAL_EOL(); + } + + void host_action_prompt_plus(const char * const ptype, const char * const pstr, const bool eol=true) { + host_action_prompt(ptype, false); + SERIAL_CHAR(' '); + serialprintPGM(pstr); + if (eol) SERIAL_EOL(); + } + void host_action_prompt_begin(const char * const pstr, const bool eol/*=true*/) { host_action_prompt_plus(PSTR("begin"), pstr, eol); } + void host_action_prompt_button(const char * const pstr) { host_action_prompt_plus(PSTR("button"), pstr); } + void host_action_prompt_end() { host_action_prompt(PSTR("end")); } + void host_action_prompt_show() { host_action_prompt(PSTR("show")); } + void host_prompt_do(const PromptReason reason, const char * const pstr, const char * const pbtn/*=NULL*/) { + host_prompt_reason = reason; + host_action_prompt_end(); + host_action_prompt_begin(pstr); + if (pbtn) host_action_prompt_button(pbtn); + host_action_prompt_show(); + } + + inline void say_m876_response(const char * const pstr) { + SERIAL_ECHOPGM("M876 Responding PROMPT_"); + serialprintPGM(pstr); + SERIAL_EOL(); + } + + void host_response_handler(const uint8_t response) { + #ifdef DEBUG_HOST_ACTIONS + SERIAL_ECHOLNPAIR("M86 Handle Reason: ", host_prompt_reason); + SERIAL_ECHOLNPAIR("M86 Handle Response: ", response); + #endif + const char *msg = PSTR("UNKNOWN STATE"); + const PromptReason hpr = host_prompt_reason; + host_prompt_reason = PROMPT_NOT_DEFINED; + switch (hpr) { + case PROMPT_FILAMENT_RUNOUT: + msg = PSTR("FILAMENT_RUNOUT"); + if (response == 0) { + advanced_pause_menu_response = ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE; + host_action_prompt_end(); // Close current prompt + host_action_prompt_begin(PSTR("Paused")); + host_action_prompt_button(PSTR("Purge More")); + if (false + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + || runout.filament_ran_out + #endif + ) + host_action_prompt_button(PSTR("DisableRunout")); + else { + host_prompt_reason = PROMPT_FILAMENT_RUNOUT; + host_action_prompt_button(PSTR("Continue")); + } + host_action_prompt_show(); + } + else if (response == 1) { + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + if (runout.filament_ran_out) { + runout.enabled = false; + runout.reset(); + } + #endif + advanced_pause_menu_response = ADVANCED_PAUSE_RESPONSE_RESUME_PRINT; + } + break; + case PROMPT_USER_CONTINUE: + msg = PSTR("FILAMENT_RUNOUT_CONTINUE"); + wait_for_user = false; + break; + case PROMPT_PAUSE_RESUME: + msg = PSTR("LCD_PAUSE_RESUME"); + enqueue_and_echo_commands_P(PSTR("M24")); + break; + case PROMPT_INFO: + msg = PSTR("GCODE_INFO"); + break; + default: break; + } + say_m876_response(msg); + } + +#endif // HOST_PROMPT_SUPPORT + +#endif // HOST_ACTION_COMMANDS diff --git a/Marlin/src/feature/host_actions.h b/Marlin/src/feature/host_actions.h new file mode 100644 index 000000000..4aee3ef1f --- /dev/null +++ b/Marlin/src/feature/host_actions.h @@ -0,0 +1,70 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../inc/MarlinConfig.h" + +void host_action(const char * const pstr, const bool eol=true); + +#ifdef ACTION_ON_KILL + void host_action_kill(); +#endif +#ifdef ACTION_ON_PAUSE + void host_action_pause(const bool eol=true); +#endif +#ifdef ACTION_ON_PAUSED + void host_action_paused(const bool eol=true); +#endif +#ifdef ACTION_ON_RESUME + void host_action_resume(); +#endif +#ifdef ACTION_ON_RESUMED + void host_action_resumed(); +#endif +#ifdef ACTION_ON_CANCEL + void host_action_cancel(); +#endif + +#if ENABLED(HOST_PROMPT_SUPPORT) + + enum PromptReason : uint8_t { + PROMPT_NOT_DEFINED, + PROMPT_FILAMENT_RUNOUT, + PROMPT_USER_CONTINUE, + PROMPT_FILAMENT_RUNOUT_REHEAT, + PROMPT_PAUSE_RESUME, + PROMPT_INFO + }; + + extern PromptReason host_prompt_reason; + + void host_response_handler(const uint8_t response); + void host_action_prompt_begin(const char * const pstr, const bool eol=true); + void host_action_prompt_button(const char * const pstr); + void host_action_prompt_end(); + void host_action_prompt_show(); + void host_prompt_do(const PromptReason type, const char * const pstr, const char * const pbtn=NULL); + inline void host_prompt_open(const PromptReason reason, const char * const pstr, const char * const pbtn=NULL) { + if (host_prompt_reason == PROMPT_NOT_DEFINED) host_prompt_do(reason, pstr, pbtn); + } + +#endif diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 1ca40f001..f0e5c74f8 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -45,6 +45,10 @@ #include "runout.h" #endif +#if ENABLED(HOST_ACTION_COMMANDS) + #include "host_actions.h" +#endif + #include "../lcd/ultralcd.h" #include "../libs/buzzer.h" #include "../libs/nozzle.h" @@ -154,6 +158,20 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l KEEPALIVE_STATE(PAUSED_FOR_USER); wait_for_user = true; // LCD click or M108 will clear this + #if ENABLED(HOST_PROMPT_SUPPORT) + const char tool = '0' + #if NUM_RUNOUT_SENSORS > 1 + + active_extruder + #endif + ; + host_prompt_reason = PROMPT_USER_CONTINUE; + host_action_prompt_end(); + host_action_prompt_begin(PSTR("Load Filament T"), false); + SERIAL_CHAR(tool); + SERIAL_EOL(); + host_action_prompt_button(PSTR("Continue")); + host_action_prompt_show(); + #endif while (wait_for_user) { #if HAS_BUZZER filament_change_beep(max_beep_count); @@ -206,6 +224,9 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l #endif wait_for_user = true; + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Continuous Purge Running..."), PSTR("Continue")); + #endif for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count) do_pause_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE); wait_for_user = false; @@ -224,6 +245,24 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l } // Show "Purge More" / "Resume" menu and wait for reply + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_reason = PROMPT_FILAMENT_RUNOUT; + host_action_prompt_end(); // Close current prompt + host_action_prompt_begin(PSTR("Paused")); + host_action_prompt_button(PSTR("PurgeMore")); + if (false + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + || runout.filament_ran_out + #endif + ) + host_action_prompt_button(PSTR("DisableRunout")); + else { + host_prompt_reason = PROMPT_FILAMENT_RUNOUT; + host_action_prompt_button(PSTR("Continue")); + } + host_action_prompt_show(); + #endif + #if HAS_LCD_MENU if (show_lcd) { KEEPALIVE_STATE(PAUSED_FOR_USER); @@ -324,10 +363,15 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u if (did_pause_print) return false; // already paused - #ifdef ACTION_ON_PAUSED - host_action_paused(); - #elif defined(ACTION_ON_PAUSE) - host_action_pause(); + #if ENABLED(HOST_ACTION_COMMANDS) + #ifdef ACTION_ON_PAUSED + host_action_paused(); + #elif defined(ACTION_ON_PAUSE) + host_action_pause(); + #endif + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_open(PROMPT_INFO, PSTR("Pause")); + #endif #endif if (!DEBUGGING(DRYRUN) && unload_length && thermalManager.targetTooColdToExtrude(active_extruder)) { @@ -445,7 +489,9 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep // Wait for filament insert by user and press button KEEPALIVE_STATE(PAUSED_FOR_USER); wait_for_user = true; // LCD click or M108 will clear this - + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Nozzle Parked"), PSTR("Continue")); + #endif while (wait_for_user) { #if HAS_BUZZER filament_change_beep(max_beep_count); @@ -463,9 +509,17 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep #endif SERIAL_ECHO_MSG(_PMSG(MSG_FILAMENT_CHANGE_HEAT)); + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_do(PROMPT_USER_CONTINUE, PSTR("HeaterTimeout"), PSTR("Reheat")); + #endif + // Wait for LCD click or M108 while (wait_for_user) idle(true); + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheating")); + #endif + // Re-enable the heaters if they timed out HOTEND_LOOP() thermalManager.reset_heater_idle_timer(e); @@ -480,7 +534,9 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep HOTEND_LOOP() thermalManager.start_heater_idle_timer(e, nozzle_timeout); - + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheat Done"), PSTR("Continue")); + #endif wait_for_user = true; nozzle_timed_out = false; @@ -578,6 +634,10 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le --did_pause_print; + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_open(PROMPT_INFO, PSTR("Resume")); + #endif + #if ENABLED(SDSUPPORT) if (did_pause_print) { card.startFileprint(); diff --git a/Marlin/src/feature/prusa_MMU2/mmu2.cpp b/Marlin/src/feature/prusa_MMU2/mmu2.cpp index bf697ea2b..d6c4c2338 100644 --- a/Marlin/src/feature/prusa_MMU2/mmu2.cpp +++ b/Marlin/src/feature/prusa_MMU2/mmu2.cpp @@ -38,6 +38,10 @@ MMU2 mmu2; #include "../../module/stepper_indirection.h" #include "../../Marlin.h" +#if ENABLED(HOST_PROMPT_SUPPORT) + #include "../../feature/host_actions.h" +#endif + #define MMU_TODELAY 100 #define MMU_TIMEOUT 10 #define MMU_CMD_TIMEOUT 60000ul //5min timeout for mmu commands (except P0) @@ -791,6 +795,9 @@ void MMU2::filamentRunout() { LCD_MESSAGEPGM(MSG_MMU2_EJECT_RECOVER); BUZZ(200, 404); wait_for_user = true; + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_do(PROMPT_USER_CONTINUE, PSTR("MMU2 Eject Recover"), PSTR("Continue")); + #endif while (wait_for_user) idle(); BUZZ(200, 404); BUZZ(200, 404); diff --git a/Marlin/src/feature/runout.cpp b/Marlin/src/feature/runout.cpp index d4162155f..8587a4c92 100644 --- a/Marlin/src/feature/runout.cpp +++ b/Marlin/src/feature/runout.cpp @@ -33,7 +33,11 @@ FilamentMonitor runout; bool FilamentMonitorBase::enabled = true, - FilamentMonitorBase::filament_ran_out; // = false + FilamentMonitorBase::filament_ran_out; // = false + +#if ENABLED(HOST_ACTION_COMMANDS) + bool FilamentMonitorBase::host_handling; // = false +#endif /** * Called by FilamentSensorSwitch::run when filament is detected. diff --git a/Marlin/src/feature/runout.h b/Marlin/src/feature/runout.h index dbbc00f4a..2fa27c23e 100644 --- a/Marlin/src/feature/runout.h +++ b/Marlin/src/feature/runout.h @@ -36,12 +36,21 @@ #include "../lcd/extensible_ui/ui_api.h" #endif +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #include "pause.h" +#endif + //#define FILAMENT_RUNOUT_SENSOR_DEBUG class FilamentMonitorBase { public: - static bool enabled; - static bool filament_ran_out; + static bool enabled, filament_ran_out; + + #if ENABLED(HOST_ACTION_COMMANDS) + static bool host_handling; + #else + constexpr static bool host_handling = false; + #endif }; template @@ -80,7 +89,7 @@ class TFilamentMonitor : public FilamentMonitorBase { // Give the response a chance to update its counter. static inline void run() { - if (enabled && !filament_ran_out && (IS_SD_PRINTING() || print_job_timer.isRunning())) { + if (enabled && !filament_ran_out && (IS_SD_PRINTING() || print_job_timer.isRunning() || did_pause_print)) { #if FILAMENT_RUNOUT_DISTANCE_MM > 0 cli(); // Prevent RunoutResponseDelayed::block_completed from accumulating here #endif @@ -92,24 +101,7 @@ class TFilamentMonitor : public FilamentMonitorBase { #endif if (ran_out) { filament_ran_out = true; - #if ENABLED(EXTENSIBLE_UI) - ExtUI::onFilamentRunout(ExtUI::getActiveTool()); - #endif - #ifdef ACTION_ON_FILAMENT_RUNOUT - #if NUM_RUNOUT_SENSORS > 1 - host_action_filament_runout(false); - SERIAL_CHAR(' '); - SERIAL_ECHOLN(int(active_extruder)); - #else - host_action_filament_runout(); - #endif - if (!IS_SD_PRINTING()) - reset(); - else - #endif - { - enqueue_and_echo_commands_P(PSTR(FILAMENT_RUNOUT_SCRIPT)); - } + event_filament_runout(); planner.synchronize(); } } @@ -317,7 +309,11 @@ class FilamentSensorBase { } static inline void block_completed(const block_t* const b) { - if (b->steps[X_AXIS] || b->steps[Y_AXIS] || b->steps[Z_AXIS]) { + if (b->steps[X_AXIS] || b->steps[Y_AXIS] || b->steps[Z_AXIS] + #if ENABLED(ADVANCED_PAUSE_FEATURE) + || did_pause_print // Allow pause purge move to re-trigger runout state + #endif + ) { // Only trigger on extrusion with XYZ movement to allow filament change and retract/recover. const uint8_t e = b->extruder; const int32_t steps = b->steps[E_AXIS]; diff --git a/Marlin/src/gcode/config/M43.cpp b/Marlin/src/gcode/config/M43.cpp index 1e896e098..977709250 100644 --- a/Marlin/src/gcode/config/M43.cpp +++ b/Marlin/src/gcode/config/M43.cpp @@ -34,6 +34,10 @@ #include "../../module/servo.h" #endif +#if ENABLED(HOST_PROMPT_SUPPORT) + #include "../../feature/host_actions.h" +#endif + inline void toggle_pins() { const bool ignore_protection = parser.boolval('I'); const int repeat = parser.intval('R', 1), @@ -286,6 +290,9 @@ void GcodeSuite::M43() { #if HAS_RESUME_CONTINUE wait_for_user = true; + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M43 Wait Called"), PSTR("Continue")); + #endif KEEPALIVE_STATE(PAUSED_FOR_USER); #endif diff --git a/Marlin/src/gcode/feature/runout/M412.cpp b/Marlin/src/gcode/feature/runout/M412.cpp index 86518a176..91a440871 100644 --- a/Marlin/src/gcode/feature/runout/M412.cpp +++ b/Marlin/src/gcode/feature/runout/M412.cpp @@ -31,9 +31,17 @@ * M412: Enable / Disable filament runout detection */ void GcodeSuite::M412() { - if (parser.seen('S')) { - runout.reset(); - runout.enabled = parser.value_bool(); + if (parser.seen("HS" + #if ENABLED(HOST_ACTION_COMMANDS) + "R" + #endif + )) { + #if ENABLED(HOST_ACTION_COMMANDS) + if (parser.seen('H')) runout.host_handling = parser.value_bool(); + #endif + const bool seenR = parser.seen('R'), seenS = parser.seen('S'); + if (seenR || seenS) runout.reset(); + if (seenS) runout.enabled = parser.value_bool(); } else { SERIAL_ECHO_START(); diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 829749804..fe095b55d 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -36,6 +36,10 @@ GcodeSuite gcode; #include "../module/printcounter.h" #endif +#if ENABLED(HOST_PROMPT_SUPPORT) + #include "../feature/host_actions.h" +#endif + #include "../Marlin.h" // for idle() and suspend_auto_report millis_t GcodeSuite::previous_move_ms; @@ -128,27 +132,17 @@ void GcodeSuite::dwell(millis_t time) { void GcodeSuite::G29_with_retry() { uint8_t retries = G29_MAX_RETRIES; while (G29()) { // G29 should return true for failed probes ONLY - if (retries--) { - #ifdef G29_ACTION_ON_RECOVER - host_action(PSTR(G29_ACTION_ON_RECOVER)); - #endif - #ifdef G29_RECOVER_COMMANDS - process_subcommands_now_P(PSTR(G29_RECOVER_COMMANDS)); - #endif - } + if (retries--) event_probe_recover(); else { - #ifdef G29_FAILURE_COMMANDS - process_subcommands_now_P(PSTR(G29_FAILURE_COMMANDS)); - #endif - #ifdef G29_ACTION_ON_FAILURE - host_action(PSTR(G29_ACTION_ON_FAILURE)); - #endif - #if ENABLED(G29_HALT_ON_FAILURE) - kill(PSTR(MSG_ERR_PROBING_FAILED)); - #endif + event_probe_failure(); return; } } + + #if ENABLED(HOST_PROMPT_SUPPORT) + if (host_prompt_reason == PROMPT_G29_RETRY) host_action_prompt_end(); + #endif + #ifdef G29_SUCCESS_COMMANDS process_subcommands_now_P(PSTR(G29_SUCCESS_COMMANDS)); #endif @@ -365,8 +359,15 @@ void GcodeSuite::process_parsed_command( case 108: M108(); break; // M108: Cancel Waiting case 112: M112(); break; // M112: Emergency Stop case 410: M410(); break; // M410: Quickstop - Abort all the planned moves. + #if ENABLED(HOST_PROMPT_SUPPORT) + case 876: M876(); break; // M876: Handle Host prompt responses + #endif #else - case 108: case 112: case 410: break; + case 108: case 112: case 410: + #if ENABLED(HOST_PROMPT_SUPPORT) + case 876: + #endif + break; #endif #if ENABLED(HOST_KEEPALIVE_FEATURE) diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index bbc1ca031..dc63dbae2 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -533,6 +533,9 @@ private: static void M108(); static void M112(); static void M410(); + #if ENABLED(HOST_PROMPT_SUPPORT) + static void M876(); + #endif #endif static void M109(); diff --git a/Marlin/src/gcode/host/M115.cpp b/Marlin/src/gcode/host/M115.cpp index cef953aa5..5b35c0453 100644 --- a/Marlin/src/gcode/host/M115.cpp +++ b/Marlin/src/gcode/host/M115.cpp @@ -132,13 +132,20 @@ void GcodeSuite::M115() { #endif ); - // EMERGENCY_PARSER (M108, M112, M410) + // EMERGENCY_PARSER (M108, M112, M410, M876) cap_line(PSTR("EMERGENCY_PARSER") #if ENABLED(EMERGENCY_PARSER) , true #endif ); + // PROMPT SUPPORT (M876) + cap_line(PSTR("PROMPT_SUPPORT") + #if ENABLED(HOST_PROMPT_SUPPORT) + , true + #endif + ); + // AUTOREPORT_SD_STATUS (M27 extension) cap_line(PSTR("AUTOREPORT_SD_STATUS") #if ENABLED(AUTO_REPORT_SD_STATUS) diff --git a/Marlin/src/gcode/host/M876.cpp b/Marlin/src/gcode/host/M876.cpp new file mode 100644 index 000000000..f0850ce45 --- /dev/null +++ b/Marlin/src/gcode/host/M876.cpp @@ -0,0 +1,37 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#include "../../inc/MarlinConfig.h" + +#if ENABLED(HOST_PROMPT_SUPPORT) && DISABLED(EMERGENCY_PARSER) + +#include "../../feature/host_actions.h" +#include "../gcode.h" +#include "../../Marlin.h" + +/** + * M876: Handle Prompt Response + */ +void GcodeSuite::M876() { + if (parser.seenval('S')) host_response_handler((uint8_t)parser.value_int()); +} + +#endif // HOST_PROMPT_SUPPORT && !EMERGENCY_PARSER diff --git a/Marlin/src/gcode/lcd/M0_M1.cpp b/Marlin/src/gcode/lcd/M0_M1.cpp index 236ec8e11..df20c6265 100644 --- a/Marlin/src/gcode/lcd/M0_M1.cpp +++ b/Marlin/src/gcode/lcd/M0_M1.cpp @@ -37,6 +37,10 @@ #include "../../feature/leds/printer_event_leds.h" #endif +#if ENABLED(HOST_PROMPT_SUPPORT) + #include "../../feature/host_actions.h" +#endif + /** * M0: Unconditional stop - Wait for user button press on LCD * M1: Conditional stop - Wait for user button press on LCD @@ -82,6 +86,10 @@ void GcodeSuite::M0_M1() { KEEPALIVE_STATE(PAUSED_FOR_USER); wait_for_user = true; + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M0/1 Break Called"), PSTR("Continue")); + #endif + if (ms > 0) { ms += millis(); // wait until this time for a click while (PENDING(millis(), ms) && wait_for_user) idle(); diff --git a/Marlin/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp b/Marlin/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp index 466eb689c..941f6ba28 100644 --- a/Marlin/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp +++ b/Marlin/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp @@ -42,6 +42,10 @@ #include "../queue.h" #endif +#if ENABLED(HOST_ACTION_COMMANDS) + #include "../../feature/host_actions.h" +#endif + /** * M20: List SD card to serial output */ @@ -103,8 +107,13 @@ void GcodeSuite::M24() { print_job_timer.start(); } - #ifdef ACTION_ON_RESUME - host_action_resume(); + #if ENABLED(HOST_ACTION_COMMANDS) + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_open(PROMPT_INFO, PSTR("Resume SD")); + #endif + #ifdef ACTION_ON_RESUME + host_action_resume(); + #endif #endif ui.reset_status(); @@ -121,14 +130,23 @@ void GcodeSuite::M25() { #endif #if ENABLED(PARK_HEAD_ON_PAUSE) + M125(); + #else + print_job_timer.pause(); ui.reset_status(); - #ifdef ACTION_ON_PAUSE - host_action_pause(); + #if ENABLED(HOST_ACTION_COMMANDS) + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_open(PROMPT_PAUSE_RESUME, PSTR("Pause SD"), PSTR("Resume")); + #endif + #ifdef ACTION_ON_PAUSE + host_action_pause(); + #endif #endif + #endif } diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 1ca316dda..f3932ff8e 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -536,8 +536,6 @@ #define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA) #define IS_CARTESIAN !IS_KINEMATIC -#define HAS_ACTION_COMMANDS (defined(ACTION_ON_KILL) || defined(ACTION_ON_PAUSE) || defined(ACTION_ON_PAUSED) || defined(ACTION_ON_RESUME) || defined(ACTION_ON_RESUMED) || defined(ACTION_ON_CANCEL) || defined(G29_ACTION_ON_RECOVER) || defined(G29_ACTION_ON_FAILURE) || defined(ACTION_ON_FILAMENT_RUNOUT)) - #ifndef INVERT_X_DIR #define INVERT_X_DIR false #endif @@ -550,3 +548,29 @@ #ifndef INVERT_E_DIR #define INVERT_E_DIR false #endif + +#if ENABLED(HOST_ACTION_COMMANDS) + #ifndef ACTION_ON_PAUSE + #define ACTION_ON_PAUSE "pause" + #endif + #ifndef ACTION_ON_RESUME + #define ACTION_ON_RESUME "resume" + #endif + #ifndef ACTION_ON_PAUSED + #define ACTION_ON_PAUSED "paused" + #endif + #ifndef ACTION_ON_RESUMED + #define ACTION_ON_RESUMED "resumed" + #endif + #ifndef ACTION_ON_CANCEL + #define ACTION_ON_CANCEL "cancel" + #endif + #if ENABLED(G29_RETRY_AND_RECOVER) + #ifndef ACTION_ON_G29_RECOVER + #define ACTION_ON_G29_RECOVER "probe_rewipe" + #endif + #ifndef ACTION_ON_G29_FAILURE + #define ACTION_ON_G29_FAILURE "probe_failed" + #endif + #endif +#endif diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index a5e4d1455..2a7c48b9b 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -42,3 +42,40 @@ // SERIAL_XON_XOFF not supported on USB-native devices #undef SERIAL_XON_XOFF #endif + +#if ENABLED(HOST_ACTION_COMMANDS) + #ifndef ACTION_ON_PAUSE + #define ACTION_ON_PAUSE "pause" + #endif + #ifndef ACTION_ON_PAUSED + #define ACTION_ON_PAUSED "paused" + #endif + #ifndef ACTION_ON_RESUME + #define ACTION_ON_RESUME "resume" + #endif + #ifndef ACTION_ON_RESUMED + #define ACTION_ON_RESUMED "resumed" + #endif + #ifndef ACTION_ON_CANCEL + #define ACTION_ON_CANCEL "cancel" + #endif + #ifndef ACTION_ON_KILL + #define ACTION_ON_KILL "poweroff" + #endif + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + #ifndef ACTION_ON_FILAMENT_RUNOUT + #define ACTION_ON_FILAMENT_RUNOUT "filament_runout" + #endif + #ifndef ACTION_REASON_ON_FILAMENT_RUNOUT + #define ACTION_REASON_ON_FILAMENT_RUNOUT "filament_runout" + #endif + #endif + #if ENABLED(G29_RETRY_AND_RECOVER) + #ifndef ACTION_ON_G29_RECOVER + #define ACTION_ON_G29_RECOVER "probe_rewipe" + #endif + #ifndef ACTION_ON_G29_FAILURE + #define ACTION_ON_G29_FAILURE "probe_failed" + #endif + #endif +#endif diff --git a/Marlin/src/lcd/extensible_ui/ui_api.cpp b/Marlin/src/lcd/extensible_ui/ui_api.cpp index f2a046412..18add7a4d 100644 --- a/Marlin/src/lcd/extensible_ui/ui_api.cpp +++ b/Marlin/src/lcd/extensible_ui/ui_api.cpp @@ -58,9 +58,12 @@ #include "../../module/tool_change.h" #endif +#if ENABLED(EMERGENCY_PARSER) + #include "../../feature/emergency_parser.h" +#endif + #if ENABLED(SDSUPPORT) #include "../../sd/cardreader.h" - #include "../../feature/emergency_parser.h" #define IFSD(A,B) (A) #else #define IFSD(A,B) (B) diff --git a/Marlin/src/lcd/menu/menu.cpp b/Marlin/src/lcd/menu/menu.cpp index 648e4bb10..d2e4cd4fd 100644 --- a/Marlin/src/lcd/menu/menu.cpp +++ b/Marlin/src/lcd/menu/menu.cpp @@ -28,6 +28,7 @@ #include "../ultralcd.h" #include "../../module/planner.h" #include "../../module/motion.h" +#include "../../module/printcounter.h" #include "../../gcode/queue.h" #include "../../sd/cardreader.h" #include "../../libs/buzzer.h" @@ -189,7 +190,9 @@ void MenuItem_bool::action_edit(PGM_P pstr, bool *ptr, screenFunc_t callback) { void _lcd_set_z_fade_height() { set_z_fade_height(lcd_z_fade_height); } #endif -bool printer_busy() { return planner.movesplanned() || IS_SD_PRINTING(); } +bool printer_busy() { + return planner.movesplanned() || IS_SD_PRINTING() || print_job_timer.isRunning(); +} /** * General function to go directly to a screen diff --git a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp index e4dc79d26..086bb9981 100644 --- a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp +++ b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp @@ -52,6 +52,9 @@ void _man_probe_pt(const float &rx, const float &ry) { KEEPALIVE_STATE(PAUSED_FOR_USER); ui.defer_status_screen(true); wait_for_user = true; + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Delta Calibration in progress"), PSTR("Continue")); + #endif while (wait_for_user) idle(); KEEPALIVE_STATE(IN_HANDLER); ui.goto_previous_screen_no_defer(); diff --git a/Marlin/src/lcd/menu/menu_main.cpp b/Marlin/src/lcd/menu/menu_main.cpp index f820d5285..03bbab91a 100644 --- a/Marlin/src/lcd/menu/menu_main.cpp +++ b/Marlin/src/lcd/menu/menu_main.cpp @@ -42,11 +42,19 @@ #include "../../sd/cardreader.h" #endif +#if ENABLED(HOST_ACTION_COMMANDS) + #include "../../feature/host_actions.h" +#endif + void lcd_pause() { #if ENABLED(POWER_LOSS_RECOVERY) if (recovery.enabled) recovery.save(true, false); #endif + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_open(PROMPT_PAUSE_RESUME, PSTR("UI Pause"), PSTR("Resume")); + #endif + #if ENABLED(PARK_HEAD_ON_PAUSE) lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT); // Show message immediately to let user know about pause in progress enqueue_and_echo_commands_P(PSTR("M25 P\nM24")); @@ -75,6 +83,9 @@ void lcd_stop() { #ifdef ACTION_ON_CANCEL host_action_cancel(); #endif + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_open(PROMPT_INFO, PSTR("UI Abort")); + #endif ui.set_status_P(PSTR(MSG_PRINT_ABORTED), -1); ui.return_to_status(); } @@ -147,9 +158,9 @@ void menu_main() { } #endif // !HAS_ENCODER_WHEEL && SDSUPPORT - #if ENABLED(SDSUPPORT) || defined(ACTION_ON_RESUME) - #if ENABLED(SDSUPPORT) - if (card.isFileOpen() && card.isPaused()) + #if ENABLED(SDSUPPORT) || ENABLED(HOST_ACTION_COMMANDS) + #if DISABLED(HOST_ACTION_COMMANDS) + if (card_open && card.isPaused()) #endif MENU_ITEM(function, MSG_RESUME_PRINT, lcd_resume); #endif diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 3e3800ee8..1eb8ac2b4 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -364,6 +364,9 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { KEEPALIVE_STATE(PAUSED_FOR_USER); wait_for_user = true; + #if ENABLED(HOST_PROMPT_SUPPORT) + host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Stow Probe"), PSTR("Continue")); + #endif while (wait_for_user) idle(); ui.reset_status(); KEEPALIVE_STATE(IN_HANDLER); diff --git a/buildroot/share/tests/teensy35_tests b/buildroot/share/tests/teensy35_tests index 785037dea..9c4c800ee 100755 --- a/buildroot/share/tests/teensy35_tests +++ b/buildroot/share/tests/teensy35_tests @@ -25,7 +25,7 @@ opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT \ BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET BABYSTEP_ZPROBE_GFX_OVERLAY \ PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE SLOW_PWM_HEATERS PIDTEMPBED EEPROM_SETTINGS INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT M100_FREE_MEMORY_WATCHER \ ADVANCED_PAUSE_FEATURE LCD_INFO_MENU ARC_SUPPORT BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES SDCARD_SORT_ALPHA PARK_HEAD_ON_PAUSE \ - ACTION_ON_KILL ACTION_ON_PAUSE ACTION_ON_PAUSED ACTION_ON_RESUME ACTION_ON_RESUMED ACTION_ON_CANCEL + HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT opt_set I2C_SLAVE_ADDRESS 63 opt_set GRID_MAX_POINTS_X 16 exec_test $1 $2 "Teensy3.5 with many features"