Bläddra i källkod

Move M118 to cpp

Scott Lahteine 7 år sedan
förälder
incheckning
379f16558e
3 ändrade filer med 5 tillägg och 6 borttagningar
  1. 0
    1
      Marlin/src/Marlin.cpp
  2. 2
    4
      Marlin/src/gcode/gcode.cpp
  3. 3
    1
      Marlin/src/gcode/host/M118.cpp

+ 0
- 1
Marlin/src/Marlin.cpp Visa fil

@@ -355,7 +355,6 @@ bool pin_is_protected(const int8_t pin) {
355 355
   return false;
356 356
 }
357 357
 
358
-#include "gcode/host/M118.h"
359 358
 #include "gcode/host/M119.h"
360 359
 
361 360
 #include "gcode/control/M120_M121.h"

+ 2
- 4
Marlin/src/gcode/gcode.cpp Visa fil

@@ -116,7 +116,6 @@ void GcodeSuite::dwell(millis_t time) {
116 116
 //
117 117
 // Placeholders for non-migrated codes
118 118
 //
119
-extern void gcode_M118();
120 119
 extern void gcode_M119();
121 120
 extern void gcode_M120();
122 121
 extern void gcode_M121();
@@ -498,9 +497,8 @@ void GcodeSuite::process_next_command() {
498 497
       case 115: M115(); break;    // M115: Report capabilities
499 498
 
500 499
       case 117: M117(); break;    // M117: Set LCD message text, if possible
501
-      case 118: // M118: Display a message in the host console
502
-        gcode_M118();
503
-        break;
500
+      case 118: M118(); break;    // M118: Display a message in the host console
501
+
504 502
       case 119: // M119: Report endstop states
505 503
         gcode_M119();
506 504
         break;

Marlin/src/gcode/host/M118.h → Marlin/src/gcode/host/M118.cpp Visa fil

@@ -20,13 +20,15 @@
20 20
  *
21 21
  */
22 22
 
23
+#include "../gcode.h"
24
+
23 25
 /**
24 26
  * M118: Display a message in the host console.
25 27
  *
26 28
  *  A  Append '// ' for an action command, as in OctoPrint
27 29
  *  E  Have the host 'echo:' the text
28 30
  */
29
-void gcode_M118() {
31
+void GcodeSuite::M118() {
30 32
   if (parser.boolval('E')) SERIAL_ECHO_START();
31 33
   if (parser.boolval('A')) SERIAL_ECHOPGM("// ");
32 34
   SERIAL_ECHOLN(parser.string_arg);

Laddar…
Avbryt
Spara