PFW-1522 Fix firmware getting stuck on ejecting

If slot is unknown, the printer will always get a rejected command
error from the MMU.

Change in memory:
Flash: +4 bytes
SRAM: 0 bytes
This commit is contained in:
Guðni Már Gilbert 2023-06-11 09:42:27 +00:00 committed by DRracer
parent c7360055ae
commit e6f05e7856
1 changed files with 7 additions and 5 deletions

View File

@ -3432,12 +3432,14 @@ static void mmu_M600_filament_change_screen(uint8_t eject_slot) {
MMU2::mmu2.clearPrinterButtonOperation(); MMU2::mmu2.clearPrinterButtonOperation();
if (btn == MMU2::Buttons::Eject) { if (btn == MMU2::Buttons::Eject) {
if (eject_slot != (uint8_t)MMU2::FILAMENT_UNKNOWN) {
MMU2::mmu2.eject_filament(eject_slot, true); MMU2::mmu2.eject_filament(eject_slot, true);
// The MMU will raise FILAMENT_EJECTED screen, and ask the user to confirm // The MMU will raise FILAMENT_EJECTED screen, and ask the user to confirm
// the operation is done. We must be careful to not raise FILAMENT_CHANGE // the operation is done. We must be careful to not raise FILAMENT_CHANGE
// screen too quickly // screen too quickly
continue; continue;
} }
}
else if (btn == MMU2::Buttons::Load) else if (btn == MMU2::Buttons::Load)
{ {
// External caller is expected to load the filament // External caller is expected to load the filament