Sfoglia il codice sorgente

Fix SD finished ExtUI / host action (#17285)

InsanityAutomation 5 anni fa
parent
commit
3655e240f5
Nessun account collegato all'indirizzo email del committer

+ 3
- 2
Marlin/src/MarlinCore.cpp Vedi File

423
     switch (card.sdprinting_done_state) {
423
     switch (card.sdprinting_done_state) {
424
 
424
 
425
       case 1:
425
       case 1:
426
-        did_state = print_job_timer.duration() < 60 || queue.enqueue_one_P(PSTR("M31"));
426
+        if (print_job_timer.duration() > 60)
427
+          did_state = queue.enqueue_one_P(PSTR("M31"));
427
         break;
428
         break;
428
 
429
 
429
       case 2:
430
       case 2:
437
         break;
438
         break;
438
 
439
 
439
       case 4:                                   // Display "Click to Continue..."
440
       case 4:                                   // Display "Click to Continue..."
440
-        #if HAS_RESUME_CONTINUE                 // 30 min timeout with LCD, 1 min without
441
+        #if HAS_LEDS_OFF_FLAG                   // 30 min timeout with LCD, 1 min without
441
           did_state = queue.enqueue_one_P(
442
           did_state = queue.enqueue_one_P(
442
             print_job_timer.duration() < 60 ? PSTR("M0Q1P1") : PSTR("M0Q1S" TERN(HAS_LCD_MENU, "1800", "60"))
443
             print_job_timer.duration() < 60 ? PSTR("M0Q1P1") : PSTR("M0Q1S" TERN(HAS_LCD_MENU, "1800", "60"))
443
           );
444
           );

+ 11
- 11
Marlin/src/gcode/lcd/M0_M1.cpp Vedi File

56
 
56
 
57
   planner.synchronize();
57
   planner.synchronize();
58
 
58
 
59
-  #if HAS_LCD_MENU || HAS_LEDS_OFF_FLAG
59
+  #if HAS_LEDS_OFF_FLAG
60
     const bool seenQ = parser.seen('Q');
60
     const bool seenQ = parser.seen('Q');
61
-    #if HAS_LEDS_OFF_FLAG
62
-      if (seenQ) printerEventLEDs.onPrintCompleted();  // Change LED color for Print Completed
63
-    #endif
61
+    if (seenQ) printerEventLEDs.onPrintCompleted();  // Change LED color for Print Completed
62
+  #else
63
+    constexpr bool seenQ = false;
64
   #endif
64
   #endif
65
 
65
 
66
   #if HAS_LCD_MENU
66
   #if HAS_LCD_MENU
75
     }
75
     }
76
 
76
 
77
   #elif ENABLED(EXTENSIBLE_UI)
77
   #elif ENABLED(EXTENSIBLE_UI)
78
-
79
-    if (parser.string_arg)
80
-      ExtUI::onUserConfirmRequired(parser.string_arg); // Can this take an SRAM string??
81
-    else
82
-      ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_USERWAIT));
83
-
78
+    if (!seenQ) {
79
+      if (parser.string_arg)
80
+        ExtUI::onUserConfirmRequired(parser.string_arg); // Can this take an SRAM string??
81
+      else
82
+        ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_USERWAIT));
83
+    }
84
   #else
84
   #else
85
 
85
 
86
     if (parser.string_arg) {
86
     if (parser.string_arg) {
94
   wait_for_user = true;
94
   wait_for_user = true;
95
 
95
 
96
   #if ENABLED(HOST_PROMPT_SUPPORT)
96
   #if ENABLED(HOST_PROMPT_SUPPORT)
97
-    host_prompt_do(PROMPT_USER_CONTINUE, parser.codenum ? PSTR("M1 Stop") : PSTR("M0 Stop"), CONTINUE_STR);
97
+    if (!seenQ) host_prompt_do(PROMPT_USER_CONTINUE, parser.codenum ? PSTR("M1 Stop") : PSTR("M0 Stop"), CONTINUE_STR);
98
   #endif
98
   #endif
99
 
99
 
100
   if (ms > 0) ms += millis();  // wait until this time for a click
100
   if (ms > 0) ms += millis();  // wait until this time for a click

+ 1
- 1
Marlin/src/inc/Conditionals_adv.h Vedi File

93
 #if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
93
 #if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
94
   #define HAS_SOFTWARE_ENDSTOPS 1
94
   #define HAS_SOFTWARE_ENDSTOPS 1
95
 #endif
95
 #endif
96
-#if ANY(EXTENSIBLE_UI, NEWPANEL, EMERGENCY_PARSER)
96
+#if ANY(EXTENSIBLE_UI, NEWPANEL, EMERGENCY_PARSER, HAS_ADC_BUTTONS)
97
   #define HAS_RESUME_CONTINUE 1
97
   #define HAS_RESUME_CONTINUE 1
98
 #endif
98
 #endif
99
 
99
 

Loading…
Annulla
Salva