From 8b81c0e88f39c44188fb5962e66b4a4c7f0164e6 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Sun, 7 Jul 2019 05:17:08 -0700 Subject: [PATCH] LEDs to default on print completion (#14535) --- Marlin/src/feature/leds/printer_event_leds.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Marlin/src/feature/leds/printer_event_leds.h b/Marlin/src/feature/leds/printer_event_leds.h index 4430e5be68..f59d6c699c 100644 --- a/Marlin/src/feature/leds/printer_event_leds.h +++ b/Marlin/src/feature/leds/printer_event_leds.h @@ -36,6 +36,14 @@ private: static bool leds_off_after_print; #endif + static inline void set_done() { + #if ENABLED(LED_COLOR_PRESETS) + leds.set_default(); + #else + leds.set_off(); + #endif + } + public: #if HAS_TEMP_HOTEND static inline LEDColor onHotendHeatingStart() { old_intensity = 0; return leds.get_color(); } @@ -60,14 +68,14 @@ public: leds_off_after_print = true; #else safe_delay(2000); - leds.set_off(); + set_done(); #endif } static inline void onResumeAfterWait() { #if HAS_LEDS_OFF_FLAG if (leds_off_after_print) { - leds.set_off(); + set_done(); leds_off_after_print = false; } #endif