|
@@ -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);
|