浏览代码

LEDs to default on print completion (#14535)

Tim Moore 6 年前
父节点
当前提交
8b81c0e88f
共有 1 个文件被更改,包括 10 次插入2 次删除
  1. 10
    2
      Marlin/src/feature/leds/printer_event_leds.h

+ 10
- 2
Marlin/src/feature/leds/printer_event_leds.h 查看文件

@@ -36,6 +36,14 @@ private:
36 36
     static bool leds_off_after_print;
37 37
   #endif
38 38
 
39
+  static inline void set_done() {
40
+    #if ENABLED(LED_COLOR_PRESETS)
41
+      leds.set_default();
42
+    #else
43
+      leds.set_off();
44
+    #endif
45
+  }
46
+
39 47
 public:
40 48
   #if HAS_TEMP_HOTEND
41 49
     static inline LEDColor onHotendHeatingStart() { old_intensity = 0; return leds.get_color(); }
@@ -60,14 +68,14 @@ public:
60 68
         leds_off_after_print = true;
61 69
       #else
62 70
         safe_delay(2000);
63
-        leds.set_off();
71
+        set_done();
64 72
       #endif
65 73
     }
66 74
 
67 75
     static inline void onResumeAfterWait() {
68 76
       #if HAS_LEDS_OFF_FLAG
69 77
         if (leds_off_after_print) {
70
-          leds.set_off();
78
+          set_done();
71 79
           leds_off_after_print = false;
72 80
         }
73 81
       #endif

正在加载...
取消
保存