Преглед на файлове

Don't move before reaching nozzle temperature when resuming the print.

Known limitations: Doesn't resume print fan. Unused code not removed. Unload filament moves extruder to print position.
Marek Bel преди 6 години
родител
ревизия
acef0578a5
променени са 1 файла, в които са добавени 20 реда и са изтрити 9 реда
  1. 20 9
      Firmware/ultralcd.cpp

+ 20 - 9
Firmware/ultralcd.cpp

@@ -5527,14 +5527,25 @@ static void pause_print()
 }
 static void resume_print()
 {
-    char cmd1[30];
-    strcpy(cmd1, "M104 S");
-    strcat(cmd1, ftostr3(HotendTempBckp));
-    enquecommand(cmd1);
-    strcpy(cmd1, "M109 S");
-    strcat(cmd1, ftostr3(HotendTempBckp));
-    enquecommand(cmd1);
-    restore_print_from_ram_and_continue(0.0);
+    lcd_set_cursor(0, 0);
+    lcdui_print_temp(LCD_STR_THERMOMETER[0], (int)(degHotend(0) + 0.5), (int)(degTargetHotend(0) + 0.5));
+    lcd_space(3);
+    lcd_puts_P(_T(MSG_HEATING));
+    if (!blocks_queued())
+    {
+        if ((0 == menu_data[0]))
+        {
+            char cmd1[30];
+            strcpy(cmd1, "M109 S");
+            strcat(cmd1, ftostr3(HotendTempBckp));
+            enquecommand(cmd1);
+            menu_data[0] = 1;
+        } else if (1 != heating_status)
+        {
+            restore_print_from_ram_and_continue(0.0);
+            menu_back();
+        }
+    }
 }
 
 static void lcd_main_menu()
@@ -5634,7 +5645,7 @@ static void lcd_main_menu()
 			}
 			else
 			{
-				MENU_ITEM_FUNCTION_P(_i("Resume print"), resume_print);////MSG_RESUME_PRINT c=0 r=0
+				MENU_ITEM_SUBMENU_P(_i("Resume print"), resume_print);////MSG_RESUME_PRINT c=0 r=0
 			}
 			MENU_ITEM_SUBMENU_P(_T(MSG_STOP_PRINT), lcd_sdcard_stop);
 		}