Bläddra i källkod

Add A (action) and E (echo) parameters to M118

Scott Lahteine 8 år sedan
förälder
incheckning
85777a56c6
1 ändrade filer med 5 tillägg och 1 borttagningar
  1. 5
    1
      Marlin/Marlin_main.cpp

+ 5
- 1
Marlin/Marlin_main.cpp Visa fil

7994
 
7994
 
7995
 /**
7995
 /**
7996
  * M118: Display a message in the host console.
7996
  * M118: Display a message in the host console.
7997
+ *
7998
+ *  A  Append '// ' for an action command, as in OctoPrint
7999
+ *  E  Have the host 'echo:' the text
7997
  */
8000
  */
7998
 inline void gcode_M118() {
8001
 inline void gcode_M118() {
7999
-  SERIAL_ECHO_START();
8002
+  if (parser.boolval('E')) SERIAL_ECHO_START();
8003
+  if (parser.boolval('A')) SERIAL_ECHOPGM("// ");
8000
   SERIAL_ECHOLN(parser.string_arg);
8004
   SERIAL_ECHOLN(parser.string_arg);
8001
 }
8005
 }
8002
 
8006
 

Laddar…
Avbryt
Spara