Browse Source

LEDs to default on print completion (#14535)

pull/1/head
Tim Moore 6 years ago
committed by Scott Lahteine
parent
commit
8b81c0e88f
  1. 12
      Marlin/src/feature/leds/printer_event_leds.h

12
Marlin/src/feature/leds/printer_event_leds.h

@ -36,6 +36,14 @@ private:
static bool leds_off_after_print; static bool leds_off_after_print;
#endif #endif
static inline void set_done() {
#if ENABLED(LED_COLOR_PRESETS)
leds.set_default();
#else
leds.set_off();
#endif
}
public: public:
#if HAS_TEMP_HOTEND #if HAS_TEMP_HOTEND
static inline LEDColor onHotendHeatingStart() { old_intensity = 0; return leds.get_color(); } static inline LEDColor onHotendHeatingStart() { old_intensity = 0; return leds.get_color(); }
@ -60,14 +68,14 @@ public:
leds_off_after_print = true; leds_off_after_print = true;
#else #else
safe_delay(2000); safe_delay(2000);
leds.set_off(); set_done();
#endif #endif
} }
static inline void onResumeAfterWait() { static inline void onResumeAfterWait() {
#if HAS_LEDS_OFF_FLAG #if HAS_LEDS_OFF_FLAG
if (leds_off_after_print) { if (leds_off_after_print) {
leds.set_off(); set_done();
leds_off_after_print = false; leds_off_after_print = false;
} }
#endif #endif

Loading…
Cancel
Save