1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

Un-pause on print cancellation (#9779)

This commit is contained in:
Scott Lahteine 2018-02-23 13:42:21 -06:00 committed by GitHub
parent 0d9d11a2d5
commit 742733d714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 1 deletions

View File

@ -449,6 +449,7 @@ void report_current_position();
#endif
#if ENABLED(ADVANCED_PAUSE_FEATURE)
extern int8_t did_pause_print;
extern AdvancedPauseMenuResponse advanced_pause_menu_response;
extern float filament_change_unload_length[EXTRUDERS],
filament_change_load_length[EXTRUDERS];

View File

@ -6406,7 +6406,7 @@ inline void gcode_M17() {
}
static float resume_position[XYZE];
static int8_t did_pause_print = 0;
int8_t did_pause_print = 0;
#if HAS_BUZZER
static void filament_change_beep(const int8_t max_beep_count, const bool init=false) {

View File

@ -296,6 +296,9 @@ void CardReader::startFileprint() {
}
void CardReader::stopSDPrint() {
#if ENABLED(ADVANCED_PAUSE_FEATURE)
did_pause_print = 0;
#endif
sdprinting = false;
if (isFileOpen()) file.close();
}

View File

@ -225,6 +225,7 @@ void process_lcd_p_command(const char* command) {
case 'X':
// cancel print
write_to_lcd_P(PSTR("{SYS:CANCELING}"));
card.stopSDPrint();
clear_command_queue();
quickstop_stepper();
print_job_timer.stop();