Move M113 to cpp

2.0.x
Scott Lahteine 7 years ago
parent 06f3c8029e
commit 14a5d2a273

@ -374,10 +374,6 @@ bool pin_is_protected(const int8_t pin) {
return false; return false;
} }
#if ENABLED(HOST_KEEPALIVE_FEATURE)
#include "gcode/host/M113.h"
#endif
#if ENABLED(BARICUDA) #if ENABLED(BARICUDA)
#if HAS_HEATER_1 #if HAS_HEATER_1
#include "gcode/feature/baricuda/M126.h" #include "gcode/feature/baricuda/M126.h"

@ -124,7 +124,6 @@ extern void gcode_M83();
extern void gcode_M85(); extern void gcode_M85();
extern void gcode_M92(); extern void gcode_M92();
extern void gcode_M100(); extern void gcode_M100();
extern void gcode_M113();
extern void gcode_M114(); extern void gcode_M114();
extern void gcode_M115(); extern void gcode_M115();
extern void gcode_M117(); extern void gcode_M117();
@ -457,9 +456,7 @@ void GcodeSuite::process_next_command() {
#endif #endif
#if ENABLED(HOST_KEEPALIVE_FEATURE) #if ENABLED(HOST_KEEPALIVE_FEATURE)
case 113: // M113: Set Host Keepalive interval case 113: M113(); break; // M113: Set Host Keepalive interval
gcode_M113();
break;
#endif #endif
#if HAS_HEATER_BED && HAS_TEMP_BED #if HAS_HEATER_BED && HAS_TEMP_BED

@ -20,18 +20,26 @@
* *
*/ */
#include "../../inc/MarlinConfig.h"
#if ENABLED(HOST_KEEPALIVE_FEATURE)
#include "../gcode.h"
/** /**
* M113: Get or set Host Keepalive interval (0 to disable) * M113: Get or set Host Keepalive interval (0 to disable)
* *
* S<seconds> Optional. Set the keepalive interval. * S<seconds> Optional. Set the keepalive interval.
*/ */
void gcode_M113() { void GcodeSuite::M113() {
if (parser.seenval('S')) { if (parser.seenval('S')) {
gcode.host_keepalive_interval = parser.value_byte(); host_keepalive_interval = parser.value_byte();
NOMORE(gcode.host_keepalive_interval, 60); NOMORE(host_keepalive_interval, 60);
} }
else { else {
SERIAL_ECHO_START(); SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR("M113 S", (unsigned long)gcode.host_keepalive_interval); SERIAL_ECHOLNPAIR("M113 S", (unsigned long)host_keepalive_interval);
} }
} }
#endif // HOST_KEEPALIVE_FEATURE
Loading…
Cancel
Save