Browse Source

🧑‍💻 Drop hostui.flag

Scott Lahteine 2 years ago
parent
commit
2d04e5733a

+ 0
- 8
Marlin/src/feature/host_actions.cpp View File

@@ -39,10 +39,7 @@
39 39
 
40 40
 HostUI hostui;
41 41
 
42
-flag_t HostUI::flag;
43
-
44 42
 void HostUI::action(FSTR_P const fstr, const bool eol) {
45
-  if (!flag.bits) return;
46 43
   PORT_REDIRECT(SerialMask::All);
47 44
   SERIAL_ECHOPGM("//action:");
48 45
   SERIAL_ECHOF(fstr);
@@ -96,21 +93,18 @@ void HostUI::action(FSTR_P const fstr, const bool eol) {
96 93
   #endif
97 94
 
98 95
   void HostUI::notify(const char * const cstr) {
99
-    if (!flag.bits) return;
100 96
     PORT_REDIRECT(SerialMask::All);
101 97
     action(F("notification "), false);
102 98
     SERIAL_ECHOLN(cstr);
103 99
   }
104 100
 
105 101
   void HostUI::notify_P(PGM_P const pstr) {
106
-    if (!flag.bits) return;
107 102
     PORT_REDIRECT(SerialMask::All);
108 103
     action(F("notification "), false);
109 104
     SERIAL_ECHOLNPGM_P(pstr);
110 105
   }
111 106
 
112 107
   void HostUI::prompt(FSTR_P const ptype, const bool eol/*=true*/) {
113
-    if (!flag.bits) return;
114 108
     PORT_REDIRECT(SerialMask::All);
115 109
     action(F("prompt_"), false);
116 110
     SERIAL_ECHOF(ptype);
@@ -118,7 +112,6 @@ void HostUI::action(FSTR_P const fstr, const bool eol) {
118 112
   }
119 113
 
120 114
   void HostUI::prompt_plus(FSTR_P const ptype, FSTR_P const fstr, const char extra_char/*='\0'*/) {
121
-    if (!flag.bits) return;
122 115
     prompt(ptype, false);
123 116
     PORT_REDIRECT(SerialMask::All);
124 117
     SERIAL_CHAR(' ');
@@ -127,7 +120,6 @@ void HostUI::action(FSTR_P const fstr, const bool eol) {
127 120
     SERIAL_EOL();
128 121
   }
129 122
   void HostUI::prompt_begin(const PromptReason reason, FSTR_P const fstr, const char extra_char/*='\0'*/) {
130
-    if (!flag.bits) return;
131 123
     prompt_end();
132 124
     host_prompt_reason = reason;
133 125
     prompt_plus(F("begin"), fstr, extra_char);

+ 0
- 8
Marlin/src/feature/host_actions.h View File

@@ -24,11 +24,6 @@
24 24
 #include "../inc/MarlinConfigPre.h"
25 25
 #include "../HAL/shared/Marduino.h"
26 26
 
27
-typedef union {
28
-  uint8_t bits;
29
-  struct { bool info:1, errors:1, debug:1; };
30
-} flag_t;
31
-
32 27
 #if ENABLED(HOST_PROMPT_SUPPORT)
33 28
 
34 29
   enum PromptReason : uint8_t {
@@ -45,9 +40,6 @@ typedef union {
45 40
 class HostUI {
46 41
   public:
47 42
 
48
-  static flag_t flag;
49
-  HostUI() { flag.bits = 0xFF; }
50
-
51 43
   static void action(FSTR_P const fstr, const bool eol=true);
52 44
 
53 45
   #ifdef ACTION_ON_KILL

+ 0
- 8
Marlin/src/gcode/control/M111.cpp View File

@@ -22,20 +22,12 @@
22 22
 
23 23
 #include "../gcode.h"
24 24
 
25
-#if ENABLED(HOST_ACTION_COMMANDS)
26
-  #include "../../feature/host_actions.h"
27
-#endif
28
-
29 25
 /**
30 26
  * M111: Set the debug level
31 27
  */
32 28
 void GcodeSuite::M111() {
33 29
   if (parser.seenval('S')) marlin_debug_flags = parser.value_byte();
34 30
 
35
-  #if EITHER(HOST_ACTION_COMMANDS, HOST_PROMPT_SUPPORT)
36
-    if (parser.seenval('H')) hostui.flag.bits = parser.value_byte();
37
-  #endif
38
-
39 31
   static PGMSTR(str_debug_1, STR_DEBUG_ECHO);
40 32
   static PGMSTR(str_debug_2, STR_DEBUG_INFO);
41 33
   static PGMSTR(str_debug_4, STR_DEBUG_ERRORS);

Loading…
Cancel
Save