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

Do not allow to resume a print twice while waiting for the hotend

Clear isPrintPaused just prior to restore_print_from_ram_and_continue.
Yuri D'Elia преди 4 години
родител
ревизия
348bbbffb0
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      Firmware/ultralcd.cpp

+ 2 - 2
Firmware/ultralcd.cpp

@@ -6752,10 +6752,10 @@ void lcd_resume_print()
 
     if (fan_error_selftest()) return; //abort if error persists
 
+    isPrintPaused = false;
     restore_print_from_ram_and_continue(0.0);
     pause_time += (_millis() - start_pause_print); //accumulate time when print is paused for correct statistics calculation
     refresh_cmd_timeout();
-    isPrintPaused = false;
     SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_RESUMED); //resume octoprint
 }
 
@@ -6907,7 +6907,7 @@ static void lcd_main_menu()
 			{
 				MENU_ITEM_FUNCTION_P(_i("Pause print"), lcd_pause_print);////MSG_PAUSE_PRINT
 			}
-			else
+			else if(isPrintPaused)
 			{
 				#ifdef FANCHECK
 					if((fan_check_error == EFCE_FIXED) || (fan_check_error == EFCE_OK))