Browse Source

Show print time with PRINTER_EVENT_LEDS

Scott Lahteine 5 years ago
parent
commit
0ce83dee95
2 changed files with 5 additions and 10 deletions
  1. 3
    7
      Marlin/src/gcode/lcd/M0_M1.cpp
  2. 2
    3
      Marlin/src/gcode/queue.cpp

+ 3
- 7
Marlin/src/gcode/lcd/M0_M1.cpp View File

71
 
71
 
72
     if (has_message)
72
     if (has_message)
73
       ui.set_status(args, true);
73
       ui.set_status(args, true);
74
-    else {
74
+    else if (!parser.seenval('Q')) {
75
       LCD_MESSAGEPGM(MSG_USERWAIT);
75
       LCD_MESSAGEPGM(MSG_USERWAIT);
76
       #if ENABLED(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
76
       #if ENABLED(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
77
         ui.reset_progress_bar_timeout();
77
         ui.reset_progress_bar_timeout();
101
     host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M0/1 Break Called"), CONTINUE_STR);
101
     host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M0/1 Break Called"), CONTINUE_STR);
102
   #endif
102
   #endif
103
 
103
 
104
-  if (ms > 0) {
105
-    ms += millis();  // wait until this time for a click
106
-    while (PENDING(millis(), ms) && wait_for_user) idle();
107
-  }
108
-  else
109
-    while (wait_for_user) idle();
104
+  if (ms > 0) ms += millis();  // wait until this time for a click
105
+  while (wait_for_user && (ms > 0 || PENDING(millis(), ms))) idle();
110
 
106
 
111
   #if HAS_LEDS_OFF_FLAG
107
   #if HAS_LEDS_OFF_FLAG
112
     printerEventLEDs.onResumeAfterWait();
108
     printerEventLEDs.onResumeAfterWait();

+ 2
- 3
Marlin/src/gcode/queue.cpp View File

163
   if (*cmd == 0 || *cmd == '\n' || *cmd == '\r') return true;
163
   if (*cmd == 0 || *cmd == '\n' || *cmd == '\r') return true;
164
 
164
 
165
   if (_enqueue(cmd)) {
165
   if (_enqueue(cmd)) {
166
-    SERIAL_ECHO_START();
167
-    SERIAL_ECHOLNPAIR(MSG_ENQUEUEING, cmd, "\"");
166
+    SERIAL_ECHO_MSG(MSG_ENQUEUEING, cmd, "\"");
168
     return true;
167
     return true;
169
   }
168
   }
170
   return false;
169
   return false;
517
             #if ENABLED(PRINTER_EVENT_LEDS)
516
             #if ENABLED(PRINTER_EVENT_LEDS)
518
               printerEventLEDs.onPrintCompleted();
517
               printerEventLEDs.onPrintCompleted();
519
               #if HAS_RESUME_CONTINUE
518
               #if HAS_RESUME_CONTINUE
520
-                inject_P(PSTR("M0 S"
519
+                inject_P(PSTR("M0 Q S"
521
                   #if HAS_LCD_MENU
520
                   #if HAS_LCD_MENU
522
                     "1800"
521
                     "1800"
523
                   #else
522
                   #else

Loading…
Cancel
Save