ソースを参照

Fix "paused" message and M125 called by M25 (#12551)

Scott Lahteine 6年前
コミット
03ef2d6c82
コミッターのメールアドレスに関連付けられたアカウントが存在しません

+ 6
- 8
Marlin/src/feature/pause.cpp ファイルの表示

@@ -45,10 +45,7 @@
45 45
   #include "../feature/runout.h"
46 46
 #endif
47 47
 
48
-#if HAS_LCD_MENU
49
-  #include "../lcd/ultralcd.h"
50
-#endif
51
-
48
+#include "../lcd/ultralcd.h"
52 49
 #include "../libs/buzzer.h"
53 50
 #include "../libs/nozzle.h"
54 51
 #include "pause.h"
@@ -531,7 +528,7 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
531 528
   SERIAL_ECHOPAIR("\nextruder_duplication_enabled:", extruder_duplication_enabled);
532 529
   SERIAL_ECHOPAIR("\nactive_extruder:", active_extruder);
533 530
   SERIAL_ECHOPGM("\n\n");
534
-  */
531
+  //*/
535 532
 
536 533
   if (!did_pause_print) return;
537 534
 
@@ -590,9 +587,10 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
590 587
     }
591 588
   #endif
592 589
 
593
-  #if ENABLED(ULTRA_LCD)
594
-    ui.reset_status();
595
-  #endif
590
+  // Resume the print job timer if it was running
591
+  if (print_job_timer.isPaused()) print_job_timer.start();
592
+
593
+  ui.reset_status();
596 594
 }
597 595
 
598 596
 #endif // ADVANCED_PAUSE_FEATURE

+ 5
- 4
Marlin/src/gcode/feature/pause/M125.cpp ファイルの表示

@@ -68,15 +68,16 @@ void GcodeSuite::M125() {
68 68
     park_point.y += (active_extruder ? hotend_offset[Y_AXIS][active_extruder] : 0);
69 69
   #endif
70 70
 
71
-  const bool job_running = print_job_timer.isRunning(),
72
-             sd_printing = IS_SD_PRINTING();
73
-
74 71
   if (pause_print(retract, park_point)) {
72
+    #if ENABLED(SDSUPPORT)
73
+      const bool sd_printing = IS_SD_PRINTING() || parser.boolval('S'); // Undocumented parameter
74
+    #else
75
+      constexpr bool sd_printing = false;
76
+    #endif
75 77
     if (!sd_printing) {
76 78
       wait_for_confirmation();
77 79
       resume_print();
78 80
     }
79
-    if (job_running) print_job_timer.start();
80 81
   }
81 82
 }
82 83
 

+ 0
- 5
Marlin/src/gcode/feature/pause/M600.cpp ファイルの表示

@@ -129,8 +129,6 @@ void GcodeSuite::M600() {
129 129
     #endif
130 130
   );
131 131
 
132
-  const bool job_running = print_job_timer.isRunning();
133
-
134 132
   if (pause_print(retract, park_point, unload_length, true DXC_PASS)) {
135 133
     wait_for_confirmation(true, beep_count DXC_PASS);
136 134
     resume_print(slow_load_length, fast_load_length, ADVANCED_PAUSE_PURGE_LENGTH, beep_count DXC_PASS);
@@ -141,9 +139,6 @@ void GcodeSuite::M600() {
141 139
     if (active_extruder_before_filament_change != active_extruder)
142 140
       tool_change(active_extruder_before_filament_change, 0, true);
143 141
   #endif
144
-
145
-  // Resume the print job timer if it was running
146
-  if (job_running) print_job_timer.start();
147 142
 }
148 143
 
149 144
 #endif // ADVANCED_PAUSE_FEATURE

+ 1
- 1
Marlin/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp ファイルの表示

@@ -113,7 +113,7 @@ void GcodeSuite::M25() {
113 113
   print_job_timer.pause();
114 114
 
115 115
   #if ENABLED(PARK_HEAD_ON_PAUSE)
116
-    enqueue_and_echo_commands_P(PSTR("M125")); // Must be enqueued with pauseSDPrint set to be last in the buffer
116
+    enqueue_and_echo_commands_P(PSTR("M125 S")); // To be last in the buffer, must enqueue after pauseSDPrint
117 117
   #endif
118 118
 }
119 119
 

+ 1
- 6
Marlin/src/lcd/menu/menu_main.cpp ファイルの表示

@@ -45,12 +45,7 @@
45 45
     #if ENABLED(POWER_LOSS_RECOVERY)
46 46
       if (recovery.enabled) recovery.save(true, false);
47 47
     #endif
48
-    card.pauseSDPrint();
49
-    print_job_timer.pause();
50
-    #if ENABLED(PARK_HEAD_ON_PAUSE)
51
-      enqueue_and_echo_commands_P(PSTR("M125"));
52
-    #endif
53
-    ui.reset_status();
48
+    enqueue_and_echo_commands_P(PSTR("M25"));
54 49
   }
55 50
 
56 51
   void lcd_sdcard_resume() {

+ 3
- 5
Marlin/src/lcd/ultralcd.cpp ファイルの表示

@@ -26,9 +26,7 @@
26 26
 #if HAS_SPI_LCD || ENABLED(MALYAN_LCD) || ENABLED(EXTENSIBLE_UI)
27 27
   #include "ultralcd.h"
28 28
   MarlinUI ui;
29
-  #if ENABLED(SDSUPPORT)
30
-    #include "../sd/cardreader.h"
31
-  #endif
29
+  #include "../sd/cardreader.h"
32 30
   #if ENABLED(EXTENSIBLE_UI)
33 31
     #define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80u)
34 32
   #endif
@@ -1243,7 +1241,7 @@ void MarlinUI::update() {
1243 1241
     static const char printing[] PROGMEM = MSG_PRINTING;
1244 1242
     static const char welcome[] PROGMEM = WELCOME_MSG;
1245 1243
     PGM_P msg;
1246
-    if (print_job_timer.isPaused())
1244
+    if (!IS_SD_PRINTING() && print_job_timer.isPaused())
1247 1245
       msg = paused;
1248 1246
     #if ENABLED(SDSUPPORT)
1249 1247
       else if (IS_SD_PRINTING())
@@ -1257,4 +1255,4 @@ void MarlinUI::update() {
1257 1255
     set_status_P(msg, -1);
1258 1256
   }
1259 1257
 
1260
-#endif
1258
+#endif // HAS_SPI_LCD || EXTENSIBLE_UI

+ 1
- 1
Marlin/src/module/temperature.cpp ファイルの表示

@@ -1922,7 +1922,7 @@ void Temperature::isr() {
1922 1922
     ;
1923 1923
 
1924 1924
     /**
1925
-     * Standard PWM modulation
1925
+     * Standard heater PWM modulation
1926 1926
      */
1927 1927
     if (pwm_count_tmp >= 127) {
1928 1928
       pwm_count_tmp -= 127;

+ 7
- 2
Marlin/src/sd/cardreader.cpp ファイルの表示

@@ -1027,15 +1027,20 @@ void CardReader::printingHasFinished() {
1027 1027
     #if ENABLED(SD_FINISHED_STEPPERRELEASE) && defined(SD_FINISHED_RELEASECOMMAND)
1028 1028
       planner.finish_and_disable();
1029 1029
     #endif
1030
+
1030 1031
     print_job_timer.stop();
1031
-    if (print_job_timer.duration() > 60)
1032
-      enqueue_and_echo_commands_P(PSTR("M31"));
1032
+    if (print_job_timer.duration() > 60) enqueue_and_echo_commands_P(PSTR("M31"));
1033
+
1033 1034
     #if ENABLED(SDCARD_SORT_ALPHA)
1034 1035
       presort();
1035 1036
     #endif
1037
+
1036 1038
     #if ENABLED(ULTRA_LCD) && ENABLED(LCD_SET_PROGRESS_MANUALLY)
1037 1039
       ui.progress_bar_percent = 0;
1038 1040
     #endif
1041
+
1042
+    ui.reset_status();
1043
+
1039 1044
     #if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
1040 1045
       ui.reselect_last_file();
1041 1046
     #endif

読み込み中…
キャンセル
保存