Browse Source

Move M114 to cpp

Scott Lahteine 7 years ago
parent
commit
81b8fbf4d6
3 changed files with 8 additions and 6 deletions
  1. 0
    1
      Marlin/src/Marlin.cpp
  2. 1
    4
      Marlin/src/gcode/gcode.cpp
  3. 7
    1
      Marlin/src/gcode/host/M114.cpp

+ 0
- 1
Marlin/src/Marlin.cpp View File

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

+ 1
- 4
Marlin/src/gcode/gcode.cpp View File

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

Marlin/src/gcode/host/M114.h → Marlin/src/gcode/host/M114.cpp View File

@@ -20,6 +20,12 @@
20 20
  *
21 21
  */
22 22
 
23
+#include "../../inc/MarlinConfig.h"
24
+
25
+#include "../gcode.h"
26
+#include "../../module/motion.h"
27
+#include "../../module/stepper.h"
28
+
23 29
 #ifdef M114_DETAIL
24 30
 
25 31
   void report_xyze(const float pos[XYZE], const uint8_t n = 4, const uint8_t precision = 3) {
@@ -99,7 +105,7 @@
99 105
 /**
100 106
  * M114: Report current position to host
101 107
  */
102
-void gcode_M114() {
108
+void GcodeSuite::M114() {
103 109
 
104 110
   #ifdef M114_DETAIL
105 111
     if (parser.seen('D')) {

Loading…
Cancel
Save