From 729a3a43da06e9f34e621c8fad66683d633d1666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sun, 30 Apr 2023 16:40:40 +0000 Subject: [PATCH] logic: eject_filament: reset LED state on OK event Fix a minor issue where once the FILAMENT_EJECTED error screen is shown on the MK3S+, the LEDs will stay blinking red even after the user has removed the filament and clicked "Done". My proposal is to turn the LED off. Steps to reproduce: 1. Boot up printer and MMU in a clean state 2. MK3S+: on the LCD click "Load to Nozzle" 3. Once the loading is done, click "Unload filament" 4. Once unloading is done, click "Eject filament" 5. FILAMENT_EJECTED MMU error screen appears on the printer's UI 6. Remove the filament and select "Done". * Expected behavior: Blinking red LED turns off (or goes green). * Actual behavior: LED continous to blink red with no error screen. Change in memory: Flash: +16 bytes SRAM: 0 bytes --- src/logic/eject_filament.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/logic/eject_filament.cpp b/src/logic/eject_filament.cpp index d7bb5a6..d36feb5 100644 --- a/src/logic/eject_filament.cpp +++ b/src/logic/eject_filament.cpp @@ -80,6 +80,7 @@ bool EjectFilament::StepInner() { ResumeIdlerSelector(); switch (error) { case ErrorCode::FILAMENT_EJECTED: // the user clicked "Done", we can finish the Eject operation + ml::leds.SetPairButOffOthers(mg::globals.ActiveSlot(), ml::off, ml::off); FinishedOK(); break; case ErrorCode::FINDA_FLICKERS: