Merge pull request #4661 from gudnimg/PFW-1557

PFW-1557 MMU: Improve unload handling when print is aborted
This commit is contained in:
3d-gussner 2024-04-15 15:13:09 +02:00 committed by GitHub
commit e8d55486fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 18 additions and 15 deletions

View File

@ -5716,23 +5716,26 @@ void lcd_print_stop_finish()
// restore the auto hotend state // restore the auto hotend state
hotendDefaultAutoFanState(); hotendDefaultAutoFanState();
}
if (MMU2::mmu2.Enabled() && MMU2::mmu2.FindaDetectsFilament()) if (MMU2::mmu2.Enabled() && MMU2::mmu2.FindaDetectsFilament()
{ #ifdef FANCHECK
// The print was aborted while when the nozzle was cold: && fan_check_error != EFCE_REPORTED
// 1. in a paused state => a partial backup in RAM is always available #endif //FANCHECK
// 2. after a recoverable thermal/fan error had paused the print => only extruder temperature is saved to RAM ) {
if (printingIsPaused()) // The print was aborted while when the nozzle was cold:
{ // 1. in a paused state => a partial backup in RAM is always available
// Restore temperature saved in ram after pausing print // 2. after a recoverable thermal/fan error had paused the print => only extruder temperature is saved to RAM
restore_extruder_temperature_from_ram(); if (printingIsPaused())
} {
// Restore temperature saved in ram after pausing print
restore_extruder_temperature_from_ram();
}
// If the pause state was cleared previously or the target temperature is 0°C in the case // If the pause state was cleared previously or the target temperature is 0°C in the case
// of an unconditional stop. In that scenario we do not want to unload. // of an unconditional stop. In that scenario we do not want to unload.
if (target_temperature[0] >= extrude_min_temp) { if (target_temperature[0] >= extrude_min_temp) {
MMU2::mmu2.unload(); // M702 MMU2::mmu2.unload(); // M702
}
} }
} }