Browse Source

Move G20_G21 to cpp

Scott Lahteine 7 years ago
parent
commit
a1ee1628e5
3 changed files with 12 additions and 10 deletions
  1. 0
    4
      Marlin/src/Marlin.cpp
  2. 2
    4
      Marlin/src/gcode/gcode.cpp
  3. 10
    2
      Marlin/src/gcode/units/G20_G21.cpp

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

357
  ***************** GCode Handlers *****************
357
  ***************** GCode Handlers *****************
358
  **************************************************/
358
  **************************************************/
359
 
359
 
360
-#if ENABLED(INCH_MODE_SUPPORT)
361
-  #include "gcode/units/G20_G21.h"
362
-#endif
363
-
364
 #if ENABLED(NOZZLE_PARK_FEATURE)
360
 #if ENABLED(NOZZLE_PARK_FEATURE)
365
   #include "gcode/feature/pause/G27.h"
361
   #include "gcode/feature/pause/G27.h"
366
 #endif
362
 #endif

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

116
 //
116
 //
117
 // Placeholders for non-migrated codes
117
 // Placeholders for non-migrated codes
118
 //
118
 //
119
-extern void gcode_G20();
120
-extern void gcode_G21();
121
 extern void gcode_G27();
119
 extern void gcode_G27();
122
 extern void gcode_G30();
120
 extern void gcode_G30();
123
 extern void gcode_G31();
121
 extern void gcode_G31();
331
 
329
 
332
       #if ENABLED(INCH_MODE_SUPPORT)
330
       #if ENABLED(INCH_MODE_SUPPORT)
333
         case 20: // G20: Inch Mode
331
         case 20: // G20: Inch Mode
334
-          gcode_G20();
332
+          G20();
335
           break;
333
           break;
336
 
334
 
337
         case 21: // G21: MM Mode
335
         case 21: // G21: MM Mode
338
-          gcode_G21();
336
+          G21();
339
           break;
337
           break;
340
       #endif // INCH_MODE_SUPPORT
338
       #endif // INCH_MODE_SUPPORT
341
 
339
 

Marlin/src/gcode/units/G20_G21.h → Marlin/src/gcode/units/G20_G21.cpp View File

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
+#include "../../inc/MarlinConfig.h"
24
+
25
+#if ENABLED(INCH_MODE_SUPPORT)
26
+
27
+#include "../gcode.h"
28
+
23
 /**
29
 /**
24
  * G20: Set input mode to inches
30
  * G20: Set input mode to inches
25
  */
31
  */
26
-void gcode_G20() { parser.set_input_linear_units(LINEARUNIT_INCH); }
32
+void GcodeSuite::G20() { parser.set_input_linear_units(LINEARUNIT_INCH); }
27
 
33
 
28
 /**
34
 /**
29
  * G21: Set input mode to millimeters
35
  * G21: Set input mode to millimeters
30
  */
36
  */
31
-void gcode_G21() { parser.set_input_linear_units(LINEARUNIT_MM); }
37
+void GcodeSuite::G21() { parser.set_input_linear_units(LINEARUNIT_MM); }
38
+
39
+#endif // INCH_MODE_SUPPORT

Loading…
Cancel
Save