Make use of the CRITICAL_SECTION macros in lcd_print_stop

This commit is contained in:
Yuri D'Elia 2019-12-16 16:39:20 +01:00
parent faa76df2fe
commit 8d490f941a
1 changed files with 3 additions and 2 deletions

View File

@ -7262,7 +7262,7 @@ void lcd_print_stop()
SERIAL_ECHOLNRPGM(MSG_OCTOPRINT_CANCEL); // for Octoprint
}
cli();
CRITICAL_SECTION_START;
// Clear any saved printing state
cancel_saved_printing();
@ -7274,7 +7274,8 @@ void lcd_print_stop()
card.sdprinting = false;
card.closefile();
st_reset_timer();
sei();
CRITICAL_SECTION_END;
lcd_setstatuspgm(_T(MSG_PRINT_ABORTED));
stoptime = _millis();