|
|
@ -29,7 +29,16 @@
|
|
|
|
* E1 Have the host 'echo:' the text
|
|
|
|
* E1 Have the host 'echo:' the text
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void GcodeSuite::M118() {
|
|
|
|
void GcodeSuite::M118() {
|
|
|
|
if (parser.seenval('E') && parser.value_bool()) SERIAL_ECHO_START();
|
|
|
|
bool hasE = false, hasA = false;
|
|
|
|
if (parser.seenval('A') && parser.value_bool()) SERIAL_ECHOPGM("// ");
|
|
|
|
char *p = parser.string_arg;
|
|
|
|
SERIAL_ECHOLN(parser.string_arg);
|
|
|
|
for (uint8_t i = 2; i--;)
|
|
|
|
|
|
|
|
if ((p[0] == 'A' || p[0] == 'E') && p[1] == '1') {
|
|
|
|
|
|
|
|
if (p[0] == 'A') hasA = true;
|
|
|
|
|
|
|
|
if (p[0] == 'E') hasE = true;
|
|
|
|
|
|
|
|
p += 2;
|
|
|
|
|
|
|
|
while (*p == ' ') ++p;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (hasE) SERIAL_ECHO_START();
|
|
|
|
|
|
|
|
if (hasA) SERIAL_ECHOPGM("// ");
|
|
|
|
|
|
|
|
SERIAL_ECHOLN(p);
|
|
|
|
}
|
|
|
|
}
|
|
|
|