Fix SD finished ExtUI / host action (#17285)
This commit is contained in:
parent
98ef161bfe
commit
3655e240f5
|
@ -423,7 +423,8 @@ void startOrResumeJob() {
|
||||||
switch (card.sdprinting_done_state) {
|
switch (card.sdprinting_done_state) {
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
did_state = print_job_timer.duration() < 60 || queue.enqueue_one_P(PSTR("M31"));
|
if (print_job_timer.duration() > 60)
|
||||||
|
did_state = queue.enqueue_one_P(PSTR("M31"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
|
@ -437,7 +438,7 @@ void startOrResumeJob() {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4: // Display "Click to Continue..."
|
case 4: // Display "Click to Continue..."
|
||||||
#if HAS_RESUME_CONTINUE // 30 min timeout with LCD, 1 min without
|
#if HAS_LEDS_OFF_FLAG // 30 min timeout with LCD, 1 min without
|
||||||
did_state = queue.enqueue_one_P(
|
did_state = queue.enqueue_one_P(
|
||||||
print_job_timer.duration() < 60 ? PSTR("M0Q1P1") : PSTR("M0Q1S" TERN(HAS_LCD_MENU, "1800", "60"))
|
print_job_timer.duration() < 60 ? PSTR("M0Q1P1") : PSTR("M0Q1S" TERN(HAS_LCD_MENU, "1800", "60"))
|
||||||
);
|
);
|
||||||
|
|
|
@ -56,11 +56,11 @@ void GcodeSuite::M0_M1() {
|
||||||
|
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
|
|
||||||
#if HAS_LCD_MENU || HAS_LEDS_OFF_FLAG
|
#if HAS_LEDS_OFF_FLAG
|
||||||
const bool seenQ = parser.seen('Q');
|
const bool seenQ = parser.seen('Q');
|
||||||
#if HAS_LEDS_OFF_FLAG
|
if (seenQ) printerEventLEDs.onPrintCompleted(); // Change LED color for Print Completed
|
||||||
if (seenQ) printerEventLEDs.onPrintCompleted(); // Change LED color for Print Completed
|
#else
|
||||||
#endif
|
constexpr bool seenQ = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_LCD_MENU
|
#if HAS_LCD_MENU
|
||||||
|
@ -75,12 +75,12 @@ void GcodeSuite::M0_M1() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif ENABLED(EXTENSIBLE_UI)
|
#elif ENABLED(EXTENSIBLE_UI)
|
||||||
|
if (!seenQ) {
|
||||||
if (parser.string_arg)
|
if (parser.string_arg)
|
||||||
ExtUI::onUserConfirmRequired(parser.string_arg); // Can this take an SRAM string??
|
ExtUI::onUserConfirmRequired(parser.string_arg); // Can this take an SRAM string??
|
||||||
else
|
else
|
||||||
ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_USERWAIT));
|
ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_USERWAIT));
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
if (parser.string_arg) {
|
if (parser.string_arg) {
|
||||||
|
@ -94,7 +94,7 @@ void GcodeSuite::M0_M1() {
|
||||||
wait_for_user = true;
|
wait_for_user = true;
|
||||||
|
|
||||||
#if ENABLED(HOST_PROMPT_SUPPORT)
|
#if ENABLED(HOST_PROMPT_SUPPORT)
|
||||||
host_prompt_do(PROMPT_USER_CONTINUE, parser.codenum ? PSTR("M1 Stop") : PSTR("M0 Stop"), CONTINUE_STR);
|
if (!seenQ) host_prompt_do(PROMPT_USER_CONTINUE, parser.codenum ? PSTR("M1 Stop") : PSTR("M0 Stop"), CONTINUE_STR);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ms > 0) ms += millis(); // wait until this time for a click
|
if (ms > 0) ms += millis(); // wait until this time for a click
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
|
#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
|
||||||
#define HAS_SOFTWARE_ENDSTOPS 1
|
#define HAS_SOFTWARE_ENDSTOPS 1
|
||||||
#endif
|
#endif
|
||||||
#if ANY(EXTENSIBLE_UI, NEWPANEL, EMERGENCY_PARSER)
|
#if ANY(EXTENSIBLE_UI, NEWPANEL, EMERGENCY_PARSER, HAS_ADC_BUTTONS)
|
||||||
#define HAS_RESUME_CONTINUE 1
|
#define HAS_RESUME_CONTINUE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue