diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 7c9ecf7d0ceea4fd17fed95ceb1477cbe90769cd..e9ac0666c1a21957e1c4f3d08110818ce8373689 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 f4c09d2eaab137748f024a0cfbff24b7dab1421e..be3a132043199e16c52a606b2692deb39f835393 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 8dc7594ec53bf62689340bb3e4611b06fd9cc7fd..ca59a5b721933b76543315d0b229927d6b854981 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 b64357a3b142a3b7f0c9551a2150e35cfc52a502..34d0a245b87d05b1b5b9cb6ac01cf26f26de59aa 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 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(); - void host_action(const char * const pstr, const bool eol=true) { - SERIAL_ECHOPGM("//action:"); - serialprintPGM(pstr); - if (eol) 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 + +#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 // HAS_ACTION_COMMANDS +#endif /** * Manage several activities: diff --git a/Marlin/src/Marlin.h b/Marlin/src/Marlin.h index 260077c65112b087a3efdffd02d0e0cc4a0f1937..aa48af9b94deb4a1566ea6a6fe15da4ee9c94ba3 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 7c9ecf7d0ceea4fd17fed95ceb1477cbe90769cd..e9ac0666c1a21957e1c4f3d08110818ce8373689 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 f4c09d2eaab137748f024a0cfbff24b7dab1421e..be3a132043199e16c52a606b2692deb39f835393 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 ad3884e43ee3b01c107d52250b804c32b9acad16..b9b689fd52f450f87342a83ce9816b6c7947136b 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 56315b0b6a6e4e1e3d07d5699d07a04f3af95d90..ef2eb0d1101501632655ad4a986e5c35b2ac767d 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 4efd2d498d42f308317c44c02133412d9ca30cb3..cd49d04f4dae21e6bad6a2dc8fd70e7e867e759c 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 feb64301189db1e651894b10957ff817a0ef3b4e..f643ea33b9accbc61d954dddcb17f768eae3557b 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 0aebc3ec89169618b0109c8de67e1fc2df7d89b5..67a7b892d0a4095c2fa46f1168f7dbff89a3032c 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 e51e61674d030136065f59bfa1d02d8490835d82..c9caefaf5e38c6f31075e4db7e1ce0a2379c4809 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 9c9fd24bc6fbeb377f4af9f680297688834c39a5..fcb53e1805274f8f04ef56692306793e00511331 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 e29a0e9a1a288e67257518b8c3dffe018b91ac81..63f90e51a5e1b079ea214ccc7205c1ed33cef7dc 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 9c9fd24bc6fbeb377f4af9f680297688834c39a5..fcb53e1805274f8f04ef56692306793e00511331 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 0e7ef45acd713cf66184bd27e63bc924db75e0e2..ac9917c7d7681593a7354db5ce43ae21ed097e41 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 bf5b72d53b27aa43bae0d9094e0094b9ac717fb6..afa6677206833bd8cac10e3ee4da11ad58cbb787 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 0b219832a008594c48cb86bf7aac83702c22ae61..c3476d36ea3c3d14141cadc129a757a341b097fa 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 9e3912a148bdca783bbecc21b7ee4141ddf009d1..72fb0fdedfaa0403beb997509f5c99df9fc800fe 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 a54a036c25fc9134ca0d962519f6fdf05430204c..7d8c7a24320c4a71b7f0b1d50009ec6550e17144 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 bca7474929645e3b84009e6e799a35a7ec10abab..7e381ec186aa4dd8d8a9b7a0d25b5aedc207899d 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 07af3d8405be0f7a868ee4b9fc3625fdd44adb9b..e986ecf093641f493a3b39f88c816ee70079e3a2 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 73cdabbbfbf3d98974aa82979ddfbcdb8c374194..03413a3c93699bb4204239142d7d075741180780 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 5e22f8b8905389751ead877e7ca511f3cdb5a2e9..5d2803d46dd9b4b5b847ec676ac1c4c362ff2db7 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 548381b8e38d15049832fc51e0ce11429e2738c9..49fde04163c66dfecbc8c6431f62c11977099270 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 1674a9cd8d36434f3cf199505537db0cf621dfaf..421a9db0328ea15baba44c6282e637a2f9ead6d9 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 ba372bd5e9ef41a2cb0bcdc2f0438239cd6ba78f..c543d4de7f8f962e42e0fd05998c751f12d12184 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 886589feb41793a1b76ed2498d7292abb1f44d9f..a836beca1d37dc2c16f2e7585e955dac5e769c23 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 aef2278a44419a5bbb3be1911b5ac9c3c9379822..29ced61ad865782fd767e6eab674a41c3bcace3c 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 1f59bacbe2f4699e029904dd4b23c7da36881e92..35d84d4395dc5c2f6c1c05ba7e010775f906264a 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 6ed587fcdb461ed8886011900a2e4094637fe542..d42bea2d220b7fac79d85651e941cc48aae8cdfe 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 5c7233c91d69de9df262bb05f0afa3a410071897..558dc95a1b43b506f2a1ddac7391c1d584c67ecb 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 4262647f65ea390222950015da8899b2d0aa1f39..828eb306c864941e1a8480e11dcad823457bc17e 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 1f59bacbe2f4699e029904dd4b23c7da36881e92..35d84d4395dc5c2f6c1c05ba7e010775f906264a 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 2cbd124d13606e53049caf731b83af35b271fa2d..ef419900650c954264583997bec994adbd6f89a7 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 0679bf09075880c804ae67f55189d1984ed8d2e8..297d62b7992cc16c33eb658fed490d197aa4b9e1 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 0e2a47c3ef70d2ed9ec76cc7da85300ead16c80a..3d1ca6c1688b51d4e7824c843cb90491de1da0ca 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 8f1f2a31c71fcc8b06faa5b68cd50e9054e6d1af..a5c5d03e918a17d2a1998263521807b57bb39293 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 7ec064e99dfc7c7cbff1a5a1aab416fdfbf8b28d..28fe01fbfcda7c72e74329f59421126685781c8e 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 4e2a7403c2bbd5a5652f67f0a2b9c3528a190058..9d60b9502b2a83287f157cc39bc3cb2165a674ff 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 3c4f8249521d37d915d0af39fd08adbd1ec715fe..9a996088a2a11b70156e9ea81342921172d371f9 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 d5126da86ae136bb0c8a2f8a54ab5318c57d6d79..23781758c1f200652eeb065c736d495d63d6ad4c 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 e07fda7b3327e0c81147f365a739bdf40ab41577..8188a6736840affa630d09831f9bbc520df291c1 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 db440edc0956cc783475daaa8244c9108f6757d0..116ebb0398f75a6b33a3ce5cf1fa8ffbd47d29d1 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 0d073eafb98566ad20e37fe5615bc176b0472d24..2737ef355df4174f214c3547df1a45e5ea5c2191 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 15587a0cb04744a0f631a5dfda2eaf84150d7fe8..ccff738e408470581d814af00ae31e79730d50b0 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 84b9aa68b616b1acf0904b70917963981bf58c76..339ccbb970bdb13c3a5c6251ce70e921082f1eb1 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 6a5ef232759cc5172ddd5ca6f09339a3101cdb82..08302ee19fb8361d0f61a665452f336f44b422a9 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 8a543da735217864ed86f30f4e71ca01b4f24414..4b3b3b8dfbde28d0a477d7fe598fcfdfc891415b 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 5ce35127231be64564f430cc1766c94a1bd36b5c..2ecfa5d67ec618e482f729031953153b2e47048e 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 97a37074b554be7fe1a6d0dacdff88ca8dbb6412..bc2cf97ff74970b6e56fe239a6df73484e0cfe65 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 406865a042a0c41dfc000a85af9df2e8043aa78c..52f992d280c71d3c890ca99e6ef353efd34b48eb 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 e89604d0d0ae6a647cd819a5597763d4583289bc..8d7a03c8d5b9e0d534cf2820c285c684dbfaa532 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 ae44eb171823e1162358f869bbd188ecf0a7ef26..c5df9862b66cc15b29ef97e9cac2e23aa34150fa 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 15792b919d3e8d10073a7c980c2ea555386eb4a0..48a72b0617f48458e628b5bfa9bcef3886885b8b 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 cda79ca7eabe97751db90e037289acdc6a83c26a..5a683e5562528095439ac785ccd3ba6a8d524aee 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 c385919e26fb963eedced09e727c6bdeae19844f..55c27513919e2e615bd88e1d1be9989ebaa5ae8c 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 24a34b13f5fdc6d724ef2f44f9c4887a187b47bc..14a92f23294059dc9db4bce0b9dfc0dac6c80668 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 db699ba021b55796562f518c4b3122b6bed24afa..b51d2a29286e3721217c2f483e7823cee434d51b 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 44a06f0ccb447ed10c56f4416bc550aa52a1dec6..01b87ac318ab1b45c809ee6b3c40e86c1372b7a8 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 248d25d6f4b128575dd8e8e758e760f379d7be0c..24964e9e5baba65cf99b49e054a236302e600b32 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 0cf4597cbca2aaf84e7294eed5154cb163c6f8f6..0cfdf956ee6f027c27f0d87d73f12f4a46caca67 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 9f9dc4de3afc3a891ed5251d82e5f93d9c858bd7..93839bb01aba9bbdcc4df2aaaffc312e36e98a84 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 6f267b82a1b9e40c7ac89a9df9bd6c0fac4eaaa5..7006fc86588d882498d3d34daf2c1fa7f2c9f0dc 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 6d96a5cb193392a676e9e2914eb32cd3284a0c20..be2d5609b5fa76b109226527a56f7c226bbccedd 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 91965b299b3a5559d66302f2c97377a700798e93..b83bafde2b33650e2af8033ebc06c4e43482974c 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 3d3d8829abb43f39e128bbf39d70680b233a3ec0..8ec3b72b7c79293746b08be17347aafbfac530ab 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 13ec1c76679f2730eeaab08f1bef6ad58dae2da4..ccb2813a9e385bc5c279066df7b5313a5ec00f91 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 f7ad93c60ea9aea2c805c84d69dbfc535b64d742..a7f0b8fa379105aa0108386bcdbad034dbc03f4e 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 ecf8cbedefa9123e550fc68466d32730fb0127cc..c5760fa4f174357d21eb0eae2d4fb942248b54fb 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 a04cdc2273ccb9be5447065995dba9d71bc2da12..defc532246ca0ba9e8971627079acd7e29cb3b5e 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 9c46c823f72ddb4ff5ba6eb9cd5b6ee0a625ade5..902bc89d1bce5ade1fef17ad245afdb5f2d011c1 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 3b14b5a791a8afaf3edffd42f41883570e236d7d..787517f1b7ee700ab89865bb9c9d5938c1e2574d 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 6a305e0db5a985454bc0fb127e85319437332ff1..111c835b8927bc371ce87d49fe72f640b7ebdc4f 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 50c016bc80c55fb27c54108014ae4ddcc0942b83..27408421270e068da114e44ed11ffca92ce4039e 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 3165214110fdc3cf703615d86358d4f61f933ea7..19c485b17a8e1d270b89241dc7f958556ffea21f 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 101468877fd32d9dbddefbdb8cd0dd010e6eca28..b712b49472b05314b2ac84fb30163fb71c01d484 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 775370fdc8166232ee0d3416705947707aef796e..3dc80582260dcf46b7437d4e5455ccffb1adec78 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 101468877fd32d9dbddefbdb8cd0dd010e6eca28..b712b49472b05314b2ac84fb30163fb71c01d484 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 8beb948756f64e2d82c551d5a837b243227fa4b6..2f5fccaa1ff60618fbe4520117e009b46d4d0265 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 b4a71b2d754e84dc960d9917d62cc1038aaef277..33b4c171144edb7cbeb5b75d43db4ccb7fc6eb36 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 d111ef9816baee6e39903cddcbf69d790e267b07..6a0a4ba3c0a1c874bdb12db1f56df1fd872e1806 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 3d3ea19e45eef0c7f9a9a7ef535370de2f076bc5..e0b526e57eb4acee03fa7c5f149e39d06daee332 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 cbfc5233b3eec0ea6952d409d27cc9d5a40e17ef..f8202fac2bb4cc9d5c2f3ee24294048536989531 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 5da624798f844f93e3599ddb9b2314fe96044950..3df7ae071e853c35b4c95ee2769cb41aad1f1a28 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 2f3c79909e9a4f6ef4fa198f2c3f71984edf18ec..4872c335550ccefda1aee5dc7acba47d4d128f2c 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 bc27641e1fe66f0e93e7371ab2a02a38772c7755..dc414c45dc5029d7f573e158b779b147fe7d5ca8 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 7c7c6b4c5aeaff1de58758a7bf801de1cf0c2669..bba8cd5e84e3ec7fed7daaf9bae6cf6ae6b0002f 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 dd68a48198e8521393ff0d51b70a0c15ecc9620f..780d1d5674e8b5182218eb9c56d67876ff6ba39e 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 d2ff8501b9f7f1830e98f09acaf18eaeccda762d..847cbf84d85b395fba2bfdd9d4204c39e260aec8 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 3d2d0fba35b9d1aa0ecffef1c90d39dbcd65a2e0..bab117890f7457b58a335b643795ca1e69bab037 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 e8996228eb6b0a9240b2ac983c7b244ce22ccdc8..e08503a115b26b485467c46333c689bd565527ba 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 f96cb45429e3db6872e83c7cc19058652830c9db..0fff472f0d357acffeef19824b3232f3c9fea56f 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 1b87a17e8aacf59f4744fa98c6515d0dacdedfa6..59821a35e43b63206946583cc36cd59850bf41a8 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 a3f95265b9ed321c4bbaadac8808d14080b5a89a..f835e98bbc558c040c0d031313b2a186ebb31e4d 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 7490f8f75c701e89e27efd81753ca6cb80897cc5..51631886e1eb0dcd64b8b8b5bdb2fd7ac6639204 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 55fcb7fc99438f94b5960a6cb0343e6b6721af0c..f9975e37da4e0504ea2e35369103b6c6157a0f7b 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 4c67a9c28cc3ea420fe384f91e497fad6dcc9b01..bd235272a6d8234ae2aeda395ca5c113f9e8d874 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 219de0ae4c6ff2652caa7fce2feb674945b69534..ed3087c68e497b4f61f283cc9ed114fe311fb2a9 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 6ad218e330cbd41b28be71b121aa66de25e97dc7..f8c59ae703c479ff3bc36b1aea18f77098da0312 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 6fbae9f4b82229063bb5da14734a0035ed11515e..f23f30441af7621e0b411d3d5a24f5cb9d12d3b0 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 48d14319352c672b609089c6982e6cf8cf82851b..10963c382a321d439f0874db0c063f712287811e 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 da67a7d711548b2d2f46e7f30b5e91d36dced30d..01fa377595de84d6aec668a373898db44dc9e645 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 5a293041a197dc0a73fbdcb475e05a8683f07bb6..bd684e8af02828bf4c434dd3ac1a4642beebc54f 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 afa5970e01dcee885984954c644bfdf1cec5b9ac..c00d66f7db86e8f3affc713c77f94bb4a318dc4b 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 376ea3585ddfdde441c3dddbdca6d7a8f502cbc3..8429742bd4cff2d4e5c50ddb09a74511483077cf 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 bd88421aabc1e4afdb8aa00e0c00584f452e6442..d4af4aa05bde504f447f41ad333466aaf9cc0447 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 4b7c0b3ff82be0b0cc8641d04bd53ef82641d7d8..757b3b9d9a9d04bcedda3195fd42617fb0f189b0 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 b121512e2960bba8ebaff82a78eb6e9f67d58060..f342cfdaab06946946e08ad40c31010cc7819b2b 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 6d11b4e7203c82b95c7f08fa207d2eae9658bef3..b45c23ace46a6e86e5fc6c96f60ff805405815c9 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 62932901fc9b2313c997c2ef180cc7c63a089402..0117848dbd521f0aec36a9f6ee33dec1b1dd0723 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 b89828f5fbeb7a87c5c51633f26af3af1551b90c..7822b9efaa53dbddee459aac78572740fe63788c 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 b3a21715feeeccc9e5872f5fb0bb6c4a19ceb14d..a7f711cd85be49a0b2cfebca9eac3f6ad117f98e 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 2ace84cefe98807f2c1e356e9bbbf71737f81cb0..6248bf3ddaa9b68cb6a07ac81f437be59c5b8263 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 78a3c95024e0e82f41e523c8aaee916c4089eade..127dfc897ba22ae72798b031bcf6556e2e4c91db 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 059cc396ef9b43ca47edfec986a094935d4f8ddb..4bc9c846947edc3f7608ba01cf731e273e86d6de 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 b712be4da5f1f8ccb4846eabffcef1e0e4a963d3..38a5a169472236db5daa543fb3b94c6972697530 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 f232ba174514dae913b3ba5449c05d753d2579b8..a22fa2cc62bf0b178eabbb4626f79f54388f078e 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 315f79ee743ba9018d5f789f6a22b0c34471f51d..0fb6d03a19d291ff74cb9035cbda34e877d49a43 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 55b97ebb8259b735cbef7f521f7a430fe8f92535..eabb31ef81136d392984f2998eab873ce761b7e5 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 90104133975907a648430d7480bd72e33600f8f2..7c4927c2283b8d6a6aecb8228d57d80b58f64151 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 243908a38a2a505aa5dd5597d39d9ffdc1d6f6a2..1db4a7c5900ecc5acc8397c9abc5661fd3b8778c 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 5229576dbd6b2e80e9b55c359593058af9f7427b..f6270ab2cb857c0042250b4ef5933839daf8d246 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 2309ab920e5db670499e3acd2154ec6fe9ab6fdf..3e64081bb59b6f08d42ac63072ba1c5e46e139aa 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 f0f9149de5f1ffd75261553b8e3ad14ac97e9fa8..892a4c6ce4db799c9833a9bde6502b1680a870c4 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 614a55a88ac5fc0d0bbee38142fa4f25bcd96358..79a4e73de5ae1fa2d7a20ec13eb4f2c4cac5f3d3 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 e1180c690ce7f4da7d60f7d535959294e84d482c..80333f751c90f1b747cd05b3a520bd76a305c78d 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 f9a5fadf3cd07f1812bf5912fe1622ee6a6f4261..eaccacfed3b920cdcff87b5c789945e9b06a688f 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 fd0d1d06e15c08568cf8308a2834c76e44d9c7cc..1256eff1637cffa07ff4007f129ac67067bc8ef5 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 762f43aa6ef7bb31659e24f975ee04678df0ff92..36fd25c210280115bfffeea7ccb0617643274293 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 5665e7301d34017b33814eeaa77969075bdb94e5..6aba140e0d3604d1a26245148910e47849f10367 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 c4b2b567915e7a714e3cb90a109d1d5c2449dd0f..3d3ad0a6b258ddc5360f6c525d7a062ae0a14aa5 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 1c3f72d473a25b9c2488ae1fa340143eb15b7d36..fd10f96a8aa882d92ba6b7cf2628711d229c11c6 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 ad22a088608fe7d5cd09beeda88195798b16acbb..ca1be14cc048e8c643867d487bcc53c05f72eff0 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 5e14290fee6d5f488105f2874a1d9570ca72e6c7..3be0296efc1604ae6cf2edf4479256909c1f587e 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 af485c3f911eeda6999c4b4ec631abd7d00016a1..383679ed31502590f11edc074953f09220b75255 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 3590044d76a2ffc1ee6b6990abef3930f66fc6a6..930fc4779641413faef667443114917987596201 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 b0e0a7fbd86aaadccddaa234f2956eee6158070d..d736fd6629fa35a35220bb0531c0823f5b08afa3 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 3590044d76a2ffc1ee6b6990abef3930f66fc6a6..930fc4779641413faef667443114917987596201 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 33849dbbbb49e7801672b3b42a3935f35dbf6291..848b7d1a25248bbcfa8315aedf4eaa6817d31be9 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 2b73fe3ca8cf7a6d668f746de5904a8cafdb86ba..aaedf1e663f69d9475bd01146f933e1cb6d3af6e 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 bd681354653c3e1225a181c8582691b9f0873a30..a5096665c148696def4e2fc9847da572f6a5e43f 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 87d21f66a4c3c2759269725a0e5ee49d102caf2a..efd3dfc11880cd6de8066e08ab3a01ffc4570ca7 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 fd768e0022d5710dbd9687409d4486f0c445a96d..02a187566ec0d2438d3ba280036796426f32188f 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 19e2c6a1c9858d371b06c54c7b03402f1964ba01..3d77f12151c949a79b25ebd54fa1241ef0fd06ee 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 5f8722ab8b8f136d350eb2a04d351a2f08301036..f501a08635d51e82213d1d5ff4a70d483242d5b2 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 f1bc3a7ab23e6d6a4ba2ad8506f9bbb9ab0e46a1..23f125243264f9216b43ff3d9cb3a2026b157de1 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 6bff3694d0abd368a16c279f4058da0cbc4d3db9..3545b24315fd858500dd58f3d9eb3206968a6ac9 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 6cce3e3130146121e357b0a2b36e31c83218d5a7..0fd482519085b0dc34c693383f353a600763b86f 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 2b73fe3ca8cf7a6d668f746de5904a8cafdb86ba..aaedf1e663f69d9475bd01146f933e1cb6d3af6e 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 402f996ae0d331ffacecad98233017331c82564a..1daaf27cdbf8c73087afdaff4aa017d23a105b2a 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 673d244ab41e867ee25c90d21c8d3334604ff427..64c7e312d6da417efd59609555c2ae74848512a5 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 c65be8ad1de5fe286fe183d4437ed076a4ed8360..de07fe9da4ee701076d09922da8bfe8d4e97b873 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 0be57ab5f163c60b19d24692c65f113ebd7f930a..42a6fde20a63ea9c84d93132f2c9702c42168f68 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 d1d6c94d043b24fbc4aaf4b5480bd77695175416..a1d9399fe536ba1ef21f6efddbaaee983f7314bf 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 cda6f83b6c8aa47f8f87ab0038cc9e68b4fa943d..15d8952d493e4169d8b4a3423ce8dbcaa297b5e0 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 98ab0b81a6a31c09044c23cd4ddb17115fdb0a67..5cf0a6472aed53945f205d0b950b3c82f1909fa6 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 598def698c6595d1ad95124c2ae9937b7bb879d3..ed854867a6847fab33b98e09cc51102733c2adc1 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 051ef39c71a6a838d67d93a89e1700f45d7a680a..1f84938cffe75caf0a44e8582dd8d574e47df232 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 39bbb73744f67836fb3d809a7c19431256dbb1f9..6d8f3e004964b8eec8091853c465d98c4328c829 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 60aa4fa929980ee6eed967667d3935d34fb3a1b6..74f24cabb3547a94802ec0192e332f6add2cb60a 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 8a4bb603ef12911ff0e4289f389b65ce98166e34..b44115b77e31e3ed279a606f3ba33668f09948f8 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 880bed605c3beb3d7950eee60ff447558abb0387..74eb7b791c5329448170c2c02ffb2dfd1852475b 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:<ACTION_ON_FILAMENT_RUNOUT>" 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 3af0e4fdb227622172458530961ce0438fa81305..52c9286bec07fa353c575c0b4d7bf961aa3ca030 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. - */ -//#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. + * Host Action Commands * - * PAUSE / RESUME : Used in non-parking scenarios where the host handles the - * action while Marlin continues to process G-Code. (M24/M25) + * Define host streamer action commands in compliance with the standard. * - * 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) + * 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 * - * CANCEL : Instructs the host to abort the print job. Used when the - * print is canceled from the LCD menu. + * 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_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 fc8e2ef62af2c38b8a850513cf5f33e57c60a758..6840c82556dc0ac0224d4665738e4af38d18b4b1 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 b7617ae8c3ae691c78e2bcbf013ed3ace5b40d77..5494ffda08b28712311d201e1836678df536fa76 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 0000000000000000000000000000000000000000..59297af5f4eb3755cad2f1146585b388272bd156 --- /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 <http://www.gnu.org/licenses/>. + * + */ + +#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 0000000000000000000000000000000000000000..4aee3ef1f5b3bf0cb924f3707de250ec9e9f9414 --- /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 <http://www.gnu.org/licenses/>. + * + */ +#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 1ca40f00104a69b22b977704ba68ca8bef26763c..f0e5c74f8610c0da0985580edce17f17a0ead017 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 bf697ea2b6bafda67b4cd26fa04db7dd2cec0417..d6c4c23384a2e59771f5f1210c5fe686e8c8e486 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 d4162155f2670101af9d2096290bb1759b83e67d..8587a4c925d901328306f3b46d7f276e2d88a78c 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 dbbc00f4a4e0db3790769fc32c8ea131e0d8e045..2fa27c23ea6d548be4c1b212532f100dc52c9bf1 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<class RESPONSE_T, class SENSOR_T> @@ -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 1e896e098ecc351ba9be53fbdc7de45a6b0d6d14..977709250796cd6c2d5787144f398a174bcaa65a 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 86518a1764ddfefcba2c0d94b1ec4d2906a6dac5..91a440871262a0c0185c53e553cbbb389a09a22c 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 829749804ca93ea4a9135144e17e8886d9171ee3..fe095b55d5e0e31cf70d1c3507f607694f57dbda 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 bbc1ca03185fc65510342ea4d62ff2de6a7c55cb..dc63dbae2ab37574cf1073184c241b5726329738 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 cef953aa511b605c7f72b79aa396bb47a19e49fa..5b35c04535d68a78a4cc6246fc7831870e990e65 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 0000000000000000000000000000000000000000..f0850ce45405c83ecf7c1e1335bc9d5dbba4fec1 --- /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 <http://www.gnu.org/licenses/>. + * + */ +#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 236ec8e11679e27896d0838e0bd696c9338c1176..df20c626581ceeb9b65ed4bdc7f6dcdbf967867a 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 466eb689cecc345777568686bce044c2bc6b1f92..941f6ba28e41478ce4fe5908e1b1336635e61967 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 1ca316dda38a6d45bff3a52a40ca67d06cae5f16..f3932ff8eb7e60069d1cea97369545a5beea17ca 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 a5e4d14551346cc32fb5e12b40fb8f806d107b7b..2a7c48b9b081c1729e6e6f6364f8a0fe263ad989 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 f2a0464122e0c5c5ddc67a9a790bc1085ab34deb..18add7a4d796608d44ff1cb3f556b757a941fb74 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 648e4bb1088d09e65cd6e0024d56cf8879302ab6..d2e4cd4fdba7900f8cad11e4bb210a93294a9a39 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 e4dc79d269ed9eed9da47e9f78e7cb634b320cb6..086bb99812a4b7305ad78d8ccb39d9c0806babe6 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 f820d5285b31934b3bfaed404962007984cb4eab..03bbab91adbea4e9367023d906918de45c08ac18 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 3e3800ee843a6018db12202ae361d921e51a3bbb..1eb8ac2b43dc9f0bc9ba50ebbd8579e4b011394a 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 785037dea18d0d6537886a0d2bc77fa00dace73f..9c4c800ee04abda353a4895a1cc51455129e8c78 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"