MMU: Improve unload handling when print is aborted

- Don't allow re-heating the nozzle or the MMU to unload the filament if the print was aborted by a temperature error
- Allow MMU to unload filament if there is no temperature error, and there is no fan error when Fan check is enabled
- When Fan check is disabled, the MMU may unload if there is no temperature error

Change in memory:
Flash: +14 bytes
SRAM: 0 bytes

PFW-1557
This commit is contained in:
gudnimg 2024-04-14 12:07:56 +00:00
parent 52ac95f082
commit 16dfcfeb9a
1 changed files with 18 additions and 15 deletions

View File

@ -5716,10 +5716,12 @@ void lcd_print_stop_finish()
// restore the auto hotend state
hotendDefaultAutoFanState();
}
if (MMU2::mmu2.Enabled() && MMU2::mmu2.FindaDetectsFilament())
{
if (MMU2::mmu2.Enabled() && MMU2::mmu2.FindaDetectsFilament()
#ifdef FANCHECK
&& fan_check_error != EFCE_REPORTED
#endif //FANCHECK
) {
// The print was aborted while when the nozzle was cold:
// 1. in a paused state => a partial backup in RAM is always available
// 2. after a recoverable thermal/fan error had paused the print => only extruder temperature is saved to RAM
@ -5735,6 +5737,7 @@ void lcd_print_stop_finish()
MMU2::mmu2.unload(); // M702
}
}
}
lcd_cooldown(); //turns off heaters and fan; goes to status screen.