Browse Source

Move M999 to cpp

Scott Lahteine 7 years ago
parent
commit
927524af6b
3 changed files with 7 additions and 8 deletions
  1. 0
    2
      Marlin/src/Marlin.cpp
  2. 6
    2
      Marlin/src/gcode/control/M999.cpp
  3. 1
    4
      Marlin/src/gcode/gcode.cpp

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

@@ -320,8 +320,6 @@ void quickstop_stepper() {
320 320
   SYNC_PLAN_POSITION_KINEMATIC();
321 321
 }
322 322
 
323
-#include "gcode/control/M999.h"
324
-
325 323
 #include "gcode/control/T.h"
326 324
 
327 325
 #if ENABLED(USE_CONTROLLER_FAN)

Marlin/src/gcode/control/M999.h → Marlin/src/gcode/control/M999.cpp View File

@@ -20,7 +20,11 @@
20 20
  *
21 21
  */
22 22
 
23
-#include "../queue.h"
23
+#include "../gcode.h"
24
+
25
+#include "../../lcd/ultralcd.h" // for lcd_reset_alert_level
26
+#include "../../Marlin.h"       // for Running
27
+#include "../queue.h"           // for flush_and_request_resend
24 28
 
25 29
 /**
26 30
  * M999: Restart after being stopped
@@ -32,7 +36,7 @@
32 36
  * existing command buffer.
33 37
  *
34 38
  */
35
-void gcode_M999() {
39
+void GcodeSuite::M999() {
36 40
   Running = true;
37 41
   lcd_reset_alert_level();
38 42
 

+ 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_M999();
120 119
 extern void gcode_T(uint8_t tmp_extruder);
121 120
 
122 121
 #if ENABLED(M100_FREE_MEMORY_WATCHER)
@@ -687,9 +686,7 @@ void GcodeSuite::process_next_command() {
687 686
         case 869: M869(); break; // M869: Report axis error
688 687
       #endif
689 688
 
690
-      case 999: // M999: Restart after being Stopped
691
-        gcode_M999();
692
-        break;
689
+      case 999: M999(); break;  // M999: Restart after being Stopped
693 690
     }
694 691
     break;
695 692
 

Loading…
Cancel
Save