From ed3df41a7e0090eb183ea840c587d3f02ff82190 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 15 Jul 2020 19:58:32 -0500 Subject: [PATCH] Broadcast host actions Fixes #18565 --- Marlin/src/feature/host_actions.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Marlin/src/feature/host_actions.cpp b/Marlin/src/feature/host_actions.cpp index e85c5bf623..86a2bcf1a6 100644 --- a/Marlin/src/feature/host_actions.cpp +++ b/Marlin/src/feature/host_actions.cpp @@ -38,6 +38,7 @@ #endif void host_action(PGM_P const pstr, const bool eol) { + PORT_REDIRECT(SERIAL_BOTH); SERIAL_ECHOPGM("//action:"); serialprintPGM(pstr); if (eol) SERIAL_EOL(); @@ -74,18 +75,20 @@ void host_action(PGM_P const pstr, const bool eol) { PromptReason host_prompt_reason = PROMPT_NOT_DEFINED; void host_action_notify(const char * const message) { + PORT_REDIRECT(SERIAL_BOTH); host_action(PSTR("notification "), false); - SERIAL_ECHO(message); - SERIAL_EOL(); + SERIAL_ECHOLN(message); } void host_action_notify_P(PGM_P const message) { + PORT_REDIRECT(SERIAL_BOTH); host_action(PSTR("notification "), false); serialprintPGM(message); SERIAL_EOL(); } void host_action_prompt(PGM_P const ptype, const bool eol=true) { + PORT_REDIRECT(SERIAL_BOTH); host_action(PSTR("prompt_"), false); serialprintPGM(ptype); if (eol) SERIAL_EOL(); @@ -93,6 +96,7 @@ void host_action(PGM_P const pstr, const bool eol) { void host_action_prompt_plus(PGM_P const ptype, PGM_P const pstr, const char extra_char='\0') { host_action_prompt(ptype, false); + PORT_REDIRECT(SERIAL_BOTH); SERIAL_CHAR(' '); serialprintPGM(pstr); if (extra_char != '\0') SERIAL_CHAR(extra_char);