Move M113 to cpp

This commit is contained in:
Scott Lahteine
2017-09-16 22:45:58 -05:00
parent 06f3c8029e
commit 14a5d2a273
3 changed files with 13 additions and 12 deletions

View File

@ -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)
*
* S<seconds> Optional. Set the keepalive interval.
*/
void gcode_M113() {
void GcodeSuite::M113() {
if (parser.seenval('S')) {
gcode.host_keepalive_interval = parser.value_byte();
NOMORE(gcode.host_keepalive_interval, 60);
host_keepalive_interval = parser.value_byte();
NOMORE(host_keepalive_interval, 60);
}
else {
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