|
@@ -20,13 +20,24 @@
|
20
|
20
|
*
|
21
|
21
|
*/
|
22
|
22
|
|
|
23
|
+#include "../../inc/MarlinConfig.h"
|
|
24
|
+
|
|
25
|
+#if HAS_RESUME_CONTINUE
|
|
26
|
+
|
23
|
27
|
#include "../gcode.h"
|
|
28
|
+#include "../../module/stepper.h"
|
|
29
|
+
|
|
30
|
+#if ENABLED(ULTIPANEL)
|
|
31
|
+ #include "../../lcd/ultralcd.h"
|
|
32
|
+#endif
|
|
33
|
+
|
|
34
|
+#include "../../sd/cardreader.h"
|
24
|
35
|
|
25
|
36
|
/**
|
26
|
37
|
* M0: Unconditional stop - Wait for user button press on LCD
|
27
|
38
|
* M1: Conditional stop - Wait for user button press on LCD
|
28
|
39
|
*/
|
29
|
|
-void gcode_M0_M1() {
|
|
40
|
+void GcodeSuite::M0_M1() {
|
30
|
41
|
const char * const args = parser.string_arg;
|
31
|
42
|
|
32
|
43
|
millis_t ms = 0;
|
|
@@ -64,10 +75,10 @@ void gcode_M0_M1() {
|
64
|
75
|
wait_for_user = true;
|
65
|
76
|
|
66
|
77
|
stepper.synchronize();
|
67
|
|
- gcode.refresh_cmd_timeout();
|
|
78
|
+ refresh_cmd_timeout();
|
68
|
79
|
|
69
|
80
|
if (ms > 0) {
|
70
|
|
- ms += gcode.previous_cmd_ms; // wait until this time for a click
|
|
81
|
+ ms += previous_cmd_ms; // wait until this time for a click
|
71
|
82
|
while (PENDING(millis(), ms) && wait_for_user) idle();
|
72
|
83
|
}
|
73
|
84
|
else {
|
|
@@ -84,3 +95,5 @@ void gcode_M0_M1() {
|
84
|
95
|
wait_for_user = false;
|
85
|
96
|
KEEPALIVE_STATE(IN_HANDLER);
|
86
|
97
|
}
|
|
98
|
+
|
|
99
|
+#endif // HAS_RESUME_CONTINUE
|