Quellcode durchsuchen

Move M115 to cpp

Scott Lahteine vor 7 Jahren
Ursprung
Commit
1d2061c935
3 geänderte Dateien mit 7 neuen und 7 gelöschten Zeilen
  1. 0
    2
      Marlin/src/Marlin.cpp
  2. 3
    4
      Marlin/src/gcode/gcode.cpp
  3. 4
    1
      Marlin/src/gcode/host/M115.cpp

+ 0
- 2
Marlin/src/Marlin.cpp Datei anzeigen

@@ -355,8 +355,6 @@ bool pin_is_protected(const int8_t pin) {
355 355
   return false;
356 356
 }
357 357
 
358
-#include "gcode/host/M115.h"
359
-
360 358
 #include "gcode/lcd/M117.h"
361 359
 
362 360
 #include "gcode/host/M118.h"

+ 3
- 4
Marlin/src/gcode/gcode.cpp Datei anzeigen

@@ -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_M115();
120 119
 extern void gcode_M117();
121 120
 extern void gcode_M118();
122 121
 extern void gcode_M119();
@@ -496,9 +495,9 @@ void GcodeSuite::process_next_command() {
496 495
       case 92: M92(); break;      // M92: Set the steps-per-unit for one or more axes
497 496
 
498 497
       case 114: M114(); break;    // M114: Report current position
499
-      case 115: // M115: Report capabilities
500
-        gcode_M115();
501
-        break;
498
+
499
+      case 115: M115(); break;    // M115: Report capabilities
500
+
502 501
       case 117: // M117: Set LCD message text, if possible
503 502
         gcode_M117();
504 503
         break;

Marlin/src/gcode/host/M115.h → Marlin/src/gcode/host/M115.cpp Datei anzeigen

@@ -20,10 +20,13 @@
20 20
  *
21 21
  */
22 22
 
23
+#include "../gcode.h"
24
+#include "../../inc/MarlinConfig.h"
25
+
23 26
 /**
24 27
  * M115: Capabilities string
25 28
  */
26
-void gcode_M115() {
29
+void GcodeSuite::M115() {
27 30
   SERIAL_PROTOCOLLNPGM(MSG_M115_REPORT);
28 31
 
29 32
   #if ENABLED(EXTENDED_CAPABILITIES_REPORT)

Laden…
Abbrechen
Speichern