|
@@ -20,18 +20,26 @@
|
20
|
20
|
*
|
21
|
21
|
*/
|
22
|
22
|
|
|
23
|
+#include "../../inc/MarlinConfig.h"
|
|
24
|
+
|
|
25
|
+#if ENABLED(HOST_KEEPALIVE_FEATURE)
|
|
26
|
+
|
|
27
|
+#include "../gcode.h"
|
|
28
|
+
|
23
|
29
|
/**
|
24
|
30
|
* M113: Get or set Host Keepalive interval (0 to disable)
|
25
|
31
|
*
|
26
|
32
|
* S<seconds> Optional. Set the keepalive interval.
|
27
|
33
|
*/
|
28
|
|
-void gcode_M113() {
|
|
34
|
+void GcodeSuite::M113() {
|
29
|
35
|
if (parser.seenval('S')) {
|
30
|
|
- gcode.host_keepalive_interval = parser.value_byte();
|
31
|
|
- NOMORE(gcode.host_keepalive_interval, 60);
|
|
36
|
+ host_keepalive_interval = parser.value_byte();
|
|
37
|
+ NOMORE(host_keepalive_interval, 60);
|
32
|
38
|
}
|
33
|
39
|
else {
|
34
|
40
|
SERIAL_ECHO_START();
|
35
|
|
- SERIAL_ECHOLNPAIR("M113 S", (unsigned long)gcode.host_keepalive_interval);
|
|
41
|
+ SERIAL_ECHOLNPAIR("M113 S", (unsigned long)host_keepalive_interval);
|
36
|
42
|
}
|
37
|
43
|
}
|
|
44
|
+
|
|
45
|
+#endif // HOST_KEEPALIVE_FEATURE
|