Browse Source

Move M111 to cpp

Scott Lahteine 7 years ago
parent
commit
06f3c8029e
3 changed files with 5 additions and 8 deletions
  1. 0
    2
      Marlin/src/Marlin.cpp
  2. 4
    2
      Marlin/src/gcode/control/M111.cpp
  3. 1
    4
      Marlin/src/gcode/gcode.cpp

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

374
   return false;
374
   return false;
375
 }
375
 }
376
 
376
 
377
-#include "gcode/control/M111.h"
378
-
379
 #if ENABLED(HOST_KEEPALIVE_FEATURE)
377
 #if ENABLED(HOST_KEEPALIVE_FEATURE)
380
   #include "gcode/host/M113.h"
378
   #include "gcode/host/M113.h"
381
 #endif
379
 #endif

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

20
  *
20
  *
21
  */
21
  */
22
 
22
 
23
+#include "../gcode.h"
24
+
23
 /**
25
 /**
24
  * M111: Set the debug level
26
  * M111: Set the debug level
25
  */
27
  */
26
-void gcode_M111() {
28
+void GcodeSuite::M111() {
27
   if (parser.seen('S')) marlin_debug_flags = parser.byteval('S');
29
   if (parser.seen('S')) marlin_debug_flags = parser.byteval('S');
28
 
30
 
29
   const static char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO,
31
   const static char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO,
50
     for (uint8_t i = 0; i < COUNT(debug_strings); i++) {
52
     for (uint8_t i = 0; i < COUNT(debug_strings); i++) {
51
       if (TEST(marlin_debug_flags, i)) {
53
       if (TEST(marlin_debug_flags, i)) {
52
         if (comma++) SERIAL_CHAR(',');
54
         if (comma++) SERIAL_CHAR(',');
53
-        serialprintPGM((char*)pgm_read_word(&debug_strings[i]));
55
+        serialprintPGM((char*)pgm_read_ptr(&debug_strings[i]));
54
       }
56
       }
55
     }
57
     }
56
   }
58
   }

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

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_M111();
128
 extern void gcode_M113();
127
 extern void gcode_M113();
129
 extern void gcode_M114();
128
 extern void gcode_M114();
130
 extern void gcode_M115();
129
 extern void gcode_M115();
449
 
448
 
450
       case 110: M110(); break;    // M110: Set Current Line Number
449
       case 110: M110(); break;    // M110: Set Current Line Number
451
 
450
 
452
-      case 111: // M111: Set debug level
453
-        gcode_M111();
454
-        break;
451
+      case 111: M111(); break;    // M111: Set debug level
455
 
452
 
456
       #if DISABLED(EMERGENCY_PARSER)
453
       #if DISABLED(EMERGENCY_PARSER)
457
         case 108: M108(); break;  // M108: Cancel Waiting
454
         case 108: M108(); break;  // M108: Cancel Waiting

Loading…
Cancel
Save