Browse Source

Move M111 to cpp

pull/1/head
Scott Lahteine 7 years ago
parent
commit
06f3c8029e
  1. 2
      Marlin/src/Marlin.cpp
  2. 6
      Marlin/src/gcode/control/M111.cpp
  3. 5
      Marlin/src/gcode/gcode.cpp

2
Marlin/src/Marlin.cpp

@ -374,8 +374,6 @@ bool pin_is_protected(const int8_t pin) {
return false;
}
#include "gcode/control/M111.h"
#if ENABLED(HOST_KEEPALIVE_FEATURE)
#include "gcode/host/M113.h"
#endif

6
Marlin/src/gcode/control/M111.h → Marlin/src/gcode/control/M111.cpp

@ -20,10 +20,12 @@
*
*/
#include "../gcode.h"
/**
* M111: Set the debug level
*/
void gcode_M111() {
void GcodeSuite::M111() {
if (parser.seen('S')) marlin_debug_flags = parser.byteval('S');
const static char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO,
@ -50,7 +52,7 @@ void gcode_M111() {
for (uint8_t i = 0; i < COUNT(debug_strings); i++) {
if (TEST(marlin_debug_flags, i)) {
if (comma++) SERIAL_CHAR(',');
serialprintPGM((char*)pgm_read_word(&debug_strings[i]));
serialprintPGM((char*)pgm_read_ptr(&debug_strings[i]));
}
}
}

5
Marlin/src/gcode/gcode.cpp

@ -124,7 +124,6 @@ extern void gcode_M83();
extern void gcode_M85();
extern void gcode_M92();
extern void gcode_M100();
extern void gcode_M111();
extern void gcode_M113();
extern void gcode_M114();
extern void gcode_M115();
@ -449,9 +448,7 @@ void GcodeSuite::process_next_command() {
case 110: M110(); break; // M110: Set Current Line Number
case 111: // M111: Set debug level
gcode_M111();
break;
case 111: M111(); break; // M111: Set debug level
#if DISABLED(EMERGENCY_PARSER)
case 108: M108(); break; // M108: Cancel Waiting

Loading…
Cancel
Save