Merge pull request #2370 from wavexx/no_resume_while_resuming

Do not allow to resume a print twice while waiting for the hotend
This commit is contained in:
DRracer 2019-12-16 16:26:02 +01:00 committed by GitHub
commit 955c88cf68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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