瀏覽代碼

Move M118 to cpp

Scott Lahteine 7 年之前
父節點
當前提交
379f16558e
共有 3 個文件被更改,包括 5 次插入6 次删除
  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 查看文件

355
   return false;
355
   return false;
356
 }
356
 }
357
 
357
 
358
-#include "gcode/host/M118.h"
359
 #include "gcode/host/M119.h"
358
 #include "gcode/host/M119.h"
360
 
359
 
361
 #include "gcode/control/M120_M121.h"
360
 #include "gcode/control/M120_M121.h"

+ 2
- 4
Marlin/src/gcode/gcode.cpp 查看文件

116
 //
116
 //
117
 // Placeholders for non-migrated codes
117
 // Placeholders for non-migrated codes
118
 //
118
 //
119
-extern void gcode_M118();
120
 extern void gcode_M119();
119
 extern void gcode_M119();
121
 extern void gcode_M120();
120
 extern void gcode_M120();
122
 extern void gcode_M121();
121
 extern void gcode_M121();
498
       case 115: M115(); break;    // M115: Report capabilities
497
       case 115: M115(); break;    // M115: Report capabilities
499
 
498
 
500
       case 117: M117(); break;    // M117: Set LCD message text, if possible
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
       case 119: // M119: Report endstop states
502
       case 119: // M119: Report endstop states
505
         gcode_M119();
503
         gcode_M119();
506
         break;
504
         break;

Marlin/src/gcode/host/M118.h → Marlin/src/gcode/host/M118.cpp 查看文件

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

Loading…
取消
儲存