Przeglądaj źródła

Move M108, M112, M410 to cpp

Scott Lahteine 7 lat temu
rodzic
commit
5b3e49babd

+ 0
- 6
Marlin/src/Marlin.cpp Wyświetl plik

374
   return false;
374
   return false;
375
 }
375
 }
376
 
376
 
377
-#if DISABLED(EMERGENCY_PARSER)
378
-  #include "gcode/control/M108.h"
379
-  #include "gcode/control/M112.h"
380
-  #include "gcode/control/M410.h"
381
-#endif
382
-
383
 #if HAS_TEMP_BED
377
 #if HAS_TEMP_BED
384
   #include "gcode/temperature/M190.h"
378
   #include "gcode/temperature/M190.h"
385
 #endif
379
 #endif

Marlin/src/gcode/control/M108.h → Marlin/src/gcode/control/M108.cpp Wyświetl plik

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
+#include "../../inc/MarlinConfig.h"
24
+
25
+#if DISABLED(EMERGENCY_PARSER)
26
+
27
+#include "../gcode.h"
28
+#include "../../Marlin.h" // for wait_for_heatup
29
+
23
 /**
30
 /**
24
  * M108: Stop the waiting for heaters in M109, M190, M303. Does not affect the target temperature.
31
  * M108: Stop the waiting for heaters in M109, M190, M303. Does not affect the target temperature.
25
  */
32
  */
26
-void gcode_M108() {
33
+void GcodeSuite::M108() {
27
 
34
 
28
   wait_for_heatup = false;
35
   wait_for_heatup = false;
29
 
36
 
30
 }
37
 }
38
+
39
+#endif // !EMERGENCY_PARSER

Marlin/src/gcode/control/M112.h → Marlin/src/gcode/control/M112.cpp Wyświetl plik

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
+#include "../../inc/MarlinConfig.h"
24
+
25
+#if DISABLED(EMERGENCY_PARSER)
26
+
27
+#include "../gcode.h"
28
+#include "../../Marlin.h" // for kill
29
+
23
 /**
30
 /**
24
  * M112: Emergency Stop
31
  * M112: Emergency Stop
25
  */
32
  */
26
-void gcode_M112() {
33
+void GcodeSuite::M112() {
27
 
34
 
28
   kill(PSTR(MSG_KILLED));
35
   kill(PSTR(MSG_KILLED));
29
 
36
 
30
 }
37
 }
38
+
39
+#endif // !EMERGENCY_PARSER

Marlin/src/gcode/control/M410.h → Marlin/src/gcode/control/M410.cpp Wyświetl plik

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
+#include "../../inc/MarlinConfig.h"
24
+
25
+#if DISABLED(EMERGENCY_PARSER)
26
+
27
+#include "../gcode.h"
28
+#include "../../Marlin.h" // for quickstop_stepper
29
+
23
 /**
30
 /**
24
  * M410: Quickstop - Abort all planned moves
31
  * M410: Quickstop - Abort all planned moves
25
  *
32
  *
26
  * This will stop the carriages mid-move, so most likely they
33
  * This will stop the carriages mid-move, so most likely they
27
  * will be out of sync with the stepper position after this.
34
  * will be out of sync with the stepper position after this.
28
  */
35
  */
29
-void gcode_M410() {
36
+void GcodeSuite::M410() {
30
 
37
 
31
   quickstop_stepper();
38
   quickstop_stepper();
32
 
39
 
33
 }
40
 }
41
+
42
+#endif // !EMERGENCY_PARSER

+ 3
- 16
Marlin/src/gcode/gcode.cpp Wyświetl plik

124
 extern void gcode_M85();
124
 extern void gcode_M85();
125
 extern void gcode_M92();
125
 extern void gcode_M92();
126
 extern void gcode_M100();
126
 extern void gcode_M100();
127
-extern void gcode_M108();
128
 extern void gcode_M110();
127
 extern void gcode_M110();
129
 extern void gcode_M111();
128
 extern void gcode_M111();
130
-extern void gcode_M112();
131
 extern void gcode_M113();
129
 extern void gcode_M113();
132
 extern void gcode_M114();
130
 extern void gcode_M114();
133
 extern void gcode_M115();
131
 extern void gcode_M115();
178
 extern void gcode_M400();
176
 extern void gcode_M400();
179
 extern void gcode_M401();
177
 extern void gcode_M401();
180
 extern void gcode_M402();
178
 extern void gcode_M402();
181
-extern void gcode_M410();
182
 extern void gcode_M428();
179
 extern void gcode_M428();
183
 extern void gcode_M500();
180
 extern void gcode_M500();
184
 extern void gcode_M501();
181
 extern void gcode_M501();
462
         break;
459
         break;
463
 
460
 
464
       #if DISABLED(EMERGENCY_PARSER)
461
       #if DISABLED(EMERGENCY_PARSER)
465
-
466
-        case 108: // M108: Cancel Waiting
467
-          gcode_M108();
468
-          break;
469
-
470
-        case 112: // M112: Emergency Stop
471
-          gcode_M112();
472
-          break;
473
-
474
-        case 410: // M410 quickstop - Abort all the planned moves.
475
-          gcode_M410();
476
-          break;
477
-
462
+        case 108: M108(); break;  // M108: Cancel Waiting
463
+        case 112: M112(); break;  // M112: Emergency Stop
464
+        case 410: M410(); break;  // M410: Quickstop - Abort all the planned moves.
478
       #endif
465
       #endif
479
 
466
 
480
       #if ENABLED(HOST_KEEPALIVE_FEATURE)
467
       #if ENABLED(HOST_KEEPALIVE_FEATURE)

+ 2
- 8
Marlin/src/gcode/gcode.h Wyświetl plik

466
 
466
 
467
   #if DISABLED(EMERGENCY_PARSER)
467
   #if DISABLED(EMERGENCY_PARSER)
468
     static void M108();
468
     static void M108();
469
+    static void M112();
470
+    static void M410();
469
   #endif
471
   #endif
470
 
472
 
471
   static void M109();
473
   static void M109();
473
   static void M110();
475
   static void M110();
474
   static void M111();
476
   static void M111();
475
 
477
 
476
-  #if DISABLED(EMERGENCY_PARSER)
477
-    static void M112();
478
-  #endif
479
-
480
   #if ENABLED(HOST_KEEPALIVE_FEATURE)
478
   #if ENABLED(HOST_KEEPALIVE_FEATURE)
481
     static void M113();
479
     static void M113();
482
   #endif
480
   #endif
638
     static void M407();
636
     static void M407();
639
   #endif
637
   #endif
640
 
638
 
641
-  #if DISABLED(EMERGENCY_PARSER)
642
-    static void M410();
643
-  #endif
644
-
645
   #if HAS_LEVELING
639
   #if HAS_LEVELING
646
     static void M420();
640
     static void M420();
647
     static void M421();
641
     static void M421();

Ładowanie…
Anuluj
Zapisz