Browse Source

Move G4 to cpp

Scott Lahteine 7 years ago
parent
commit
760f29a88e

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

365
  ***************** GCode Handlers *****************
365
  ***************** GCode Handlers *****************
366
  **************************************************/
366
  **************************************************/
367
 
367
 
368
-#include "gcode/motion/G4.h"
369
-
370
 #if ENABLED(BEZIER_CURVE_SUPPORT)
368
 #if ENABLED(BEZIER_CURVE_SUPPORT)
371
   #include "gcode/motion/G5.h"
369
   #include "gcode/motion/G5.h"
372
 #endif
370
 #endif

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

112
 //
112
 //
113
 // Placeholders for non-migrated codes
113
 // Placeholders for non-migrated codes
114
 //
114
 //
115
-extern void gcode_G4();
116
 extern void gcode_G5();
115
 extern void gcode_G5();
117
 extern void gcode_G12();
116
 extern void gcode_G12();
118
 extern void gcode_G17();
117
 extern void gcode_G17();
295
 
294
 
296
       // G4 Dwell
295
       // G4 Dwell
297
       case 4:
296
       case 4:
298
-        gcode_G4();
297
+        G4();
299
         break;
298
         break;
300
 
299
 
301
       #if ENABLED(BEZIER_CURVE_SUPPORT)
300
       #if ENABLED(BEZIER_CURVE_SUPPORT)

+ 1
- 1
Marlin/src/gcode/gcode.h View File

299
     #define KEEPALIVE_STATE(n) NOOP
299
     #define KEEPALIVE_STATE(n) NOOP
300
   #endif
300
   #endif
301
 
301
 
302
-  void dwell(millis_t time);
302
+  static void dwell(millis_t time);
303
 
303
 
304
 private:
304
 private:
305
 
305
 

Marlin/src/gcode/motion/G4.h → Marlin/src/gcode/motion/G4.cpp View File

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
+#include "../gcode.h"
24
+#include "../../module/stepper.h"
25
+#include "../../lcd/ultralcd.h"
26
+
23
 /**
27
 /**
24
  * G4: Dwell S<seconds> or P<milliseconds>
28
  * G4: Dwell S<seconds> or P<milliseconds>
25
  */
29
  */
26
-void gcode_G4() {
30
+void GcodeSuite::G4() {
27
   millis_t dwell_ms = 0;
31
   millis_t dwell_ms = 0;
28
 
32
 
29
   if (parser.seenval('P')) dwell_ms = parser.value_millis(); // milliseconds to wait
33
   if (parser.seenval('P')) dwell_ms = parser.value_millis(); // milliseconds to wait
33
 
37
 
34
   if (!lcd_hasstatus()) LCD_MESSAGEPGM(MSG_DWELL);
38
   if (!lcd_hasstatus()) LCD_MESSAGEPGM(MSG_DWELL);
35
 
39
 
36
-  gcode.dwell(dwell_ms);
40
+  dwell(dwell_ms);
37
 }
41
 }

Loading…
Cancel
Save