|
@@ -56,9 +56,11 @@ void GcodeSuite::M0_M1() {
|
56
|
56
|
hasS = ms > 0;
|
57
|
57
|
}
|
58
|
58
|
|
|
59
|
+ const bool has_message = !hasP && !hasS && args && *args;
|
|
60
|
+
|
59
|
61
|
#if ENABLED(ULTIPANEL)
|
60
|
62
|
|
61
|
|
- if (!hasP && !hasS && args && *args)
|
|
63
|
+ if (has_message)
|
62
|
64
|
lcd_setstatus(args, true);
|
63
|
65
|
else {
|
64
|
66
|
LCD_MESSAGEPGM(MSG_USERWAIT);
|
|
@@ -69,7 +71,7 @@ void GcodeSuite::M0_M1() {
|
69
|
71
|
|
70
|
72
|
#else
|
71
|
73
|
|
72
|
|
- if (!hasP && !hasS && args && *args) {
|
|
74
|
+ if (has_message) {
|
73
|
75
|
SERIAL_ECHO_START();
|
74
|
76
|
SERIAL_ECHOLN(args);
|
75
|
77
|
}
|
|
@@ -82,18 +84,14 @@ void GcodeSuite::M0_M1() {
|
82
|
84
|
stepper.synchronize();
|
83
|
85
|
|
84
|
86
|
if (ms > 0) {
|
85
|
|
- ms += previous_move_ms; // wait until this time for a click
|
|
87
|
+ ms += millis(); // wait until this time for a click
|
86
|
88
|
while (PENDING(millis(), ms) && wait_for_user) idle();
|
87
|
89
|
}
|
88
|
90
|
else {
|
89
|
91
|
#if ENABLED(ULTIPANEL)
|
90
|
|
- if (lcd_detected()) {
|
91
|
|
- while (wait_for_user) idle();
|
92
|
|
- IS_SD_PRINTING ? LCD_MESSAGEPGM(MSG_RESUMING) : LCD_MESSAGEPGM(WELCOME_MSG);
|
93
|
|
- }
|
94
|
|
- #else
|
95
|
|
- while (wait_for_user) idle();
|
|
92
|
+ if (lcd_detected())
|
96
|
93
|
#endif
|
|
94
|
+ while (wait_for_user) idle();
|
97
|
95
|
}
|
98
|
96
|
|
99
|
97
|
#if ENABLED(PRINTER_EVENT_LEDS) && ENABLED(SDSUPPORT)
|
|
@@ -103,6 +101,12 @@ void GcodeSuite::M0_M1() {
|
103
|
101
|
}
|
104
|
102
|
#endif
|
105
|
103
|
|
|
104
|
+ #if ENABLED(ULTIPANEL)
|
|
105
|
+ if (lcd_detected()) {
|
|
106
|
+ IS_SD_PRINTING ? LCD_MESSAGEPGM(MSG_RESUMING) : LCD_MESSAGEPGM(WELCOME_MSG);
|
|
107
|
+ }
|
|
108
|
+ #endif
|
|
109
|
+
|
106
|
110
|
wait_for_user = false;
|
107
|
111
|
KEEPALIVE_STATE(IN_HANDLER);
|
108
|
112
|
}
|