From 48ce22d41fa65df46ca2dbe3b7abe7a47c7c3dd0 Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Fri, 6 Jan 2023 08:22:07 +0100 Subject: [PATCH] Fix blank LCD while err. Load to Extr. Failed Because this error is not an MMU error but a printer one, the existing infrastructure has been bent to support such a scenario. During testing it turned out, that some machines fail to draw the error screen due to previous internal states. This PR resets the internal states so that the conditions for drawing the error screen are met. --- Firmware/mmu2.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Firmware/mmu2.cpp b/Firmware/mmu2.cpp index 71007e563..ec440f0c4 100644 --- a/Firmware/mmu2.cpp +++ b/Firmware/mmu2.cpp @@ -301,7 +301,7 @@ bool MMU2::ToolChangeCommonOnce(uint8_t slot){ return true; // success } else { // Prepare a retry attempt unload(); - if( retries == 1 && eeprom_read_byte((uint8_t*)EEPROM_MMU_CUTTER_ENABLED) == EEPROM_MMU_CUTTER_ENABLED_enabled){ + if( retries == 2 && eeprom_read_byte((uint8_t*)EEPROM_MMU_CUTTER_ENABLED) == EEPROM_MMU_CUTTER_ENABLED_enabled){ cut_filament(slot); // try cutting filament tip at the last attempt } } @@ -684,6 +684,8 @@ void MMU2::CheckUserInput(){ // we'll actually wait for it automagically in manage_response and after it finishes correctly, // we'll issue another command (like toolchange) logic.ClearPrinterError(); + lastErrorCode = ErrorCode::OK; + lastErrorSource = ErrorSourceNone; // this seems to help clearing the error screen } ResumeHotendTemp(); // Recover the hotend temp before we attempt to do anything else...