Skip to content

Commit

Permalink
Show print time with PRINTER_EVENT_LEDS
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Feb 9, 2020
1 parent 3887359 commit 0ce83de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
10 changes: 3 additions & 7 deletions Marlin/src/gcode/lcd/M0_M1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void GcodeSuite::M0_M1() {

if (has_message)
ui.set_status(args, true);
else {
else if (!parser.seenval('Q')) {
LCD_MESSAGEPGM(MSG_USERWAIT);
#if ENABLED(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
ui.reset_progress_bar_timeout();
Expand Down Expand Up @@ -101,12 +101,8 @@ void GcodeSuite::M0_M1() {
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M0/1 Break Called"), CONTINUE_STR);
#endif

if (ms > 0) {
ms += millis(); // wait until this time for a click
while (PENDING(millis(), ms) && wait_for_user) idle();
}
else
while (wait_for_user) idle();
if (ms > 0) ms += millis(); // wait until this time for a click
while (wait_for_user && (ms > 0 || PENDING(millis(), ms))) idle();

#if HAS_LEDS_OFF_FLAG
printerEventLEDs.onResumeAfterWait();
Expand Down
5 changes: 2 additions & 3 deletions Marlin/src/gcode/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ bool GCodeQueue::enqueue_one(const char* cmd) {
if (*cmd == 0 || *cmd == '\n' || *cmd == '\r') return true;

if (_enqueue(cmd)) {
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_ENQUEUEING, cmd, "\"");
SERIAL_ECHO_MSG(MSG_ENQUEUEING, cmd, "\"");
return true;
}
return false;
Expand Down Expand Up @@ -517,7 +516,7 @@ void GCodeQueue::get_serial_commands() {
#if ENABLED(PRINTER_EVENT_LEDS)
printerEventLEDs.onPrintCompleted();
#if HAS_RESUME_CONTINUE
inject_P(PSTR("M0 S"
inject_P(PSTR("M0 Q S"
#if HAS_LCD_MENU
"1800"
#else
Expand Down

0 comments on commit 0ce83de

Please sign in to comment.