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
pull/272/head
Guðni Már Gilbert 2023-04-30 16:40:40 +00:00
parent 113f71330e
commit 729a3a43da
1 changed files with 1 additions and 0 deletions

View File

@ -80,6 +80,7 @@ bool EjectFilament::StepInner() {
ResumeIdlerSelector(); ResumeIdlerSelector();
switch (error) { switch (error) {
case ErrorCode::FILAMENT_EJECTED: // the user clicked "Done", we can finish the Eject operation 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(); FinishedOK();
break; break;
case ErrorCode::FINDA_FLICKERS: case ErrorCode::FINDA_FLICKERS: