Bladeren bron

Broadcast host actions

Fixes #18565
Scott Lahteine 3 jaren geleden
bovenliggende
commit
ed3df41a7e
1 gewijzigde bestanden met toevoegingen van 6 en 2 verwijderingen
  1. 6
    2
      Marlin/src/feature/host_actions.cpp

+ 6
- 2
Marlin/src/feature/host_actions.cpp Bestand weergeven

@@ -38,6 +38,7 @@
38 38
 #endif
39 39
 
40 40
 void host_action(PGM_P const pstr, const bool eol) {
41
+  PORT_REDIRECT(SERIAL_BOTH);
41 42
   SERIAL_ECHOPGM("//action:");
42 43
   serialprintPGM(pstr);
43 44
   if (eol) SERIAL_EOL();
@@ -74,18 +75,20 @@ void host_action(PGM_P const pstr, const bool eol) {
74 75
   PromptReason host_prompt_reason = PROMPT_NOT_DEFINED;
75 76
 
76 77
   void host_action_notify(const char * const message) {
78
+    PORT_REDIRECT(SERIAL_BOTH);
77 79
     host_action(PSTR("notification "), false);
78
-    SERIAL_ECHO(message);
79
-    SERIAL_EOL();
80
+    SERIAL_ECHOLN(message);
80 81
   }
81 82
 
82 83
   void host_action_notify_P(PGM_P const message) {
84
+    PORT_REDIRECT(SERIAL_BOTH);
83 85
     host_action(PSTR("notification "), false);
84 86
     serialprintPGM(message);
85 87
     SERIAL_EOL();
86 88
   }
87 89
 
88 90
   void host_action_prompt(PGM_P const ptype, const bool eol=true) {
91
+    PORT_REDIRECT(SERIAL_BOTH);
89 92
     host_action(PSTR("prompt_"), false);
90 93
     serialprintPGM(ptype);
91 94
     if (eol) SERIAL_EOL();
@@ -93,6 +96,7 @@ void host_action(PGM_P const pstr, const bool eol) {
93 96
 
94 97
   void host_action_prompt_plus(PGM_P const ptype, PGM_P const pstr, const char extra_char='\0') {
95 98
     host_action_prompt(ptype, false);
99
+    PORT_REDIRECT(SERIAL_BOTH);
96 100
     SERIAL_CHAR(' ');
97 101
     serialprintPGM(pstr);
98 102
     if (extra_char != '\0') SERIAL_CHAR(extra_char);

Laden…
Annuleren
Opslaan