瀏覽代碼

New Feature: LED_CONTROL_MENU

Tannoo 7 年之前
父節點
當前提交
cf0f78336b
共有 40 個檔案被更改,包括 752 行新增18 行删除
  1. 15
    0
      Marlin/Configuration_adv.h
  2. 14
    0
      Marlin/src/config/default/Configuration_adv.h
  3. 14
    0
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  4. 14
    0
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  5. 14
    0
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  6. 14
    0
      Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h
  7. 14
    0
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  8. 14
    0
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  9. 14
    0
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  10. 14
    0
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  11. 14
    0
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  12. 14
    0
      Marlin/src/config/examples/Felix/Configuration_adv.h
  13. 14
    0
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
  14. 14
    0
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  15. 14
    0
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  16. 14
    0
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
  17. 14
    0
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  18. 14
    0
      Marlin/src/config/examples/RigidBot/Configuration_adv.h
  19. 14
    0
      Marlin/src/config/examples/SCARA/Configuration_adv.h
  20. 14
    0
      Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
  21. 14
    0
      Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
  22. 14
    0
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
  23. 14
    0
      Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
  24. 14
    0
      Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
  25. 14
    0
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
  26. 14
    0
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
  27. 14
    0
      Marlin/src/config/examples/delta/generic/Configuration_adv.h
  28. 14
    0
      Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
  29. 14
    0
      Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
  30. 14
    0
      Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
  31. 14
    0
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
  32. 14
    0
      Marlin/src/config/examples/makibox/Configuration_adv.h
  33. 14
    0
      Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
  34. 14
    0
      Marlin/src/config/examples/wt150/Configuration_adv.h
  35. 58
    13
      Marlin/src/feature/leds/leds.cpp
  36. 2
    0
      Marlin/src/feature/leds/leds.h
  37. 21
    1
      Marlin/src/feature/leds/neopixel.cpp
  38. 2
    1
      Marlin/src/feature/leds/neopixel.h
  39. 54
    3
      Marlin/src/lcd/language/language_en.h
  40. 138
    0
      Marlin/src/lcd/ultralcd.cpp

+ 15
- 0
Marlin/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+
496
+      //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+    #endif
498
+#endif // LED_CONTROL_MENU
499
+
485
 #if ENABLED(SDSUPPORT)
500
 #if ENABLED(SDSUPPORT)
486
 
501
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
502
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/default/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/Anet/A6/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/Anet/A8/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h 查看文件

483
 // The timeout (in ms) to return to the status screen from sub-menus
483
 // The timeout (in ms) to return to the status screen from sub-menus
484
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 //#define LCD_TIMEOUT_TO_STATUS 15000
485
 
485
 
486
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
487
+#if ENABLED(LED_CONTROL_MENU)
488
+
489
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
490
+    #if ENABLED(LED_COLOR_PRESETS)
491
+      #define LED_USER_PRESET_RED       255   // User defined RED value
492
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
493
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
494
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
495
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
496
+    #endif
497
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
498
+#endif // LED_CONTROL_MENU
499
+
486
 #if ENABLED(SDSUPPORT)
500
 #if ENABLED(SDSUPPORT)
487
 
501
 
488
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
502
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/Cartesio/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/Felix/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h 查看文件

483
 // The timeout (in ms) to return to the status screen from sub-menus
483
 // The timeout (in ms) to return to the status screen from sub-menus
484
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 //#define LCD_TIMEOUT_TO_STATUS 15000
485
 
485
 
486
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
487
+#if ENABLED(LED_CONTROL_MENU)
488
+
489
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
490
+    #if ENABLED(LED_COLOR_PRESETS)
491
+      #define LED_USER_PRESET_RED       255   // User defined RED value
492
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
493
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
494
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
495
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
496
+    #endif
497
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
498
+#endif // LED_CONTROL_MENU
499
+
486
 #if ENABLED(SDSUPPORT)
500
 #if ENABLED(SDSUPPORT)
487
 
501
 
488
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
502
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/RigidBot/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/SCARA/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/Sanguinololu/Configuration_adv.h 查看文件

471
 // The timeout (in ms) to return to the status screen from sub-menus
471
 // The timeout (in ms) to return to the status screen from sub-menus
472
 //#define LCD_TIMEOUT_TO_STATUS 15000
472
 //#define LCD_TIMEOUT_TO_STATUS 15000
473
 
473
 
474
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
475
+#if ENABLED(LED_CONTROL_MENU)
476
+
477
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
478
+    #if ENABLED(LED_COLOR_PRESETS)
479
+      #define LED_USER_PRESET_RED       255   // User defined RED value
480
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
481
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
482
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
483
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
484
+    #endif
485
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
486
+#endif // LED_CONTROL_MENU
487
+
474
 #if ENABLED(SDSUPPORT)
488
 #if ENABLED(SDSUPPORT)
475
 
489
 
476
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
490
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/TinyBoy2/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h 查看文件

495
 // The timeout (in ms) to return to the status screen from sub-menus
495
 // The timeout (in ms) to return to the status screen from sub-menus
496
 //#define LCD_TIMEOUT_TO_STATUS 15000
496
 //#define LCD_TIMEOUT_TO_STATUS 15000
497
 
497
 
498
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
499
+#if ENABLED(LED_CONTROL_MENU)
500
+
501
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
502
+    #if ENABLED(LED_COLOR_PRESETS)
503
+      #define LED_USER_PRESET_RED       255   // User defined RED value
504
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
505
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
506
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
507
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
508
+    #endif
509
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
510
+#endif // LED_CONTROL_MENU
511
+
498
 #if ENABLED(SDSUPPORT)
512
 #if ENABLED(SDSUPPORT)
499
 
513
 
500
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
514
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h 查看文件

483
 // The timeout (in ms) to return to the status screen from sub-menus
483
 // The timeout (in ms) to return to the status screen from sub-menus
484
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 //#define LCD_TIMEOUT_TO_STATUS 15000
485
 
485
 
486
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
487
+#if ENABLED(LED_CONTROL_MENU)
488
+
489
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
490
+    #if ENABLED(LED_COLOR_PRESETS)
491
+      #define LED_USER_PRESET_RED       255   // User defined RED value
492
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
493
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
494
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
495
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
496
+    #endif
497
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
498
+#endif // LED_CONTROL_MENU
499
+
486
 #if ENABLED(SDSUPPORT)
500
 #if ENABLED(SDSUPPORT)
487
 
501
 
488
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
502
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h 查看文件

484
 // The timeout (in ms) to return to the status screen from sub-menus
484
 // The timeout (in ms) to return to the status screen from sub-menus
485
 //#define LCD_TIMEOUT_TO_STATUS 15000
485
 //#define LCD_TIMEOUT_TO_STATUS 15000
486
 
486
 
487
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
488
+#if ENABLED(LED_CONTROL_MENU)
489
+
490
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
491
+    #if ENABLED(LED_COLOR_PRESETS)
492
+      #define LED_USER_PRESET_RED       255   // User defined RED value
493
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
494
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
495
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
496
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
497
+    #endif
498
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
499
+#endif // LED_CONTROL_MENU
500
+
487
 #if ENABLED(SDSUPPORT)
501
 #if ENABLED(SDSUPPORT)
488
 
502
 
489
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
503
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h 查看文件

484
 // The timeout (in ms) to return to the status screen from sub-menus
484
 // The timeout (in ms) to return to the status screen from sub-menus
485
 //#define LCD_TIMEOUT_TO_STATUS 15000
485
 //#define LCD_TIMEOUT_TO_STATUS 15000
486
 
486
 
487
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
488
+#if ENABLED(LED_CONTROL_MENU)
489
+
490
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
491
+    #if ENABLED(LED_COLOR_PRESETS)
492
+      #define LED_USER_PRESET_RED       255   // User defined RED value
493
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
494
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
495
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
496
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
497
+    #endif
498
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
499
+#endif // LED_CONTROL_MENU
500
+
487
 #if ENABLED(SDSUPPORT)
501
 #if ENABLED(SDSUPPORT)
488
 
502
 
489
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
503
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/delta/generic/Configuration_adv.h 查看文件

484
 // The timeout (in ms) to return to the status screen from sub-menus
484
 // The timeout (in ms) to return to the status screen from sub-menus
485
 //#define LCD_TIMEOUT_TO_STATUS 15000
485
 //#define LCD_TIMEOUT_TO_STATUS 15000
486
 
486
 
487
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
488
+#if ENABLED(LED_CONTROL_MENU)
489
+
490
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
491
+    #if ENABLED(LED_COLOR_PRESETS)
492
+      #define LED_USER_PRESET_RED       255   // User defined RED value
493
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
494
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
495
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
496
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
497
+    #endif
498
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
499
+#endif // LED_CONTROL_MENU
500
+
487
 #if ENABLED(SDSUPPORT)
501
 #if ENABLED(SDSUPPORT)
488
 
502
 
489
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
503
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h 查看文件

484
 // The timeout (in ms) to return to the status screen from sub-menus
484
 // The timeout (in ms) to return to the status screen from sub-menus
485
 //#define LCD_TIMEOUT_TO_STATUS 15000
485
 //#define LCD_TIMEOUT_TO_STATUS 15000
486
 
486
 
487
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
488
+#if ENABLED(LED_CONTROL_MENU)
489
+
490
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
491
+    #if ENABLED(LED_COLOR_PRESETS)
492
+      #define LED_USER_PRESET_RED       255   // User defined RED value
493
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
494
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
495
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
496
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
497
+    #endif
498
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
499
+#endif // LED_CONTROL_MENU
500
+
487
 #if ENABLED(SDSUPPORT)
501
 #if ENABLED(SDSUPPORT)
488
 
502
 
489
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
503
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h 查看文件

489
 // The timeout (in ms) to return to the status screen from sub-menus
489
 // The timeout (in ms) to return to the status screen from sub-menus
490
 //#define LCD_TIMEOUT_TO_STATUS 15000
490
 //#define LCD_TIMEOUT_TO_STATUS 15000
491
 
491
 
492
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
493
+#if ENABLED(LED_CONTROL_MENU)
494
+
495
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
496
+    #if ENABLED(LED_COLOR_PRESETS)
497
+      #define LED_USER_PRESET_RED       255   // User defined RED value
498
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
499
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
500
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
501
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
502
+    #endif
503
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
504
+#endif // LED_CONTROL_MENU
505
+
492
 #if ENABLED(SDSUPPORT)
506
 #if ENABLED(SDSUPPORT)
493
 
507
 
494
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
508
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h 查看文件

484
 // The timeout (in ms) to return to the status screen from sub-menus
484
 // The timeout (in ms) to return to the status screen from sub-menus
485
 //#define LCD_TIMEOUT_TO_STATUS 15000
485
 //#define LCD_TIMEOUT_TO_STATUS 15000
486
 
486
 
487
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
488
+#if ENABLED(LED_CONTROL_MENU)
489
+
490
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
491
+    #if ENABLED(LED_COLOR_PRESETS)
492
+      #define LED_USER_PRESET_RED       255   // User defined RED value
493
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
494
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
495
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
496
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
497
+    #endif
498
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
499
+#endif // LED_CONTROL_MENU
500
+
487
 #if ENABLED(SDSUPPORT)
501
 #if ENABLED(SDSUPPORT)
488
 
502
 
489
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
503
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/makibox/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h 查看文件

482
 // The timeout (in ms) to return to the status screen from sub-menus
482
 // The timeout (in ms) to return to the status screen from sub-menus
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
483
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 
484
 
485
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
486
+#if ENABLED(LED_CONTROL_MENU)
487
+
488
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
489
+    #if ENABLED(LED_COLOR_PRESETS)
490
+      #define LED_USER_PRESET_RED       255   // User defined RED value
491
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
492
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
493
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
494
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
495
+    #endif
496
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
497
+#endif // LED_CONTROL_MENU
498
+
485
 #if ENABLED(SDSUPPORT)
499
 #if ENABLED(SDSUPPORT)
486
 
500
 
487
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
501
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 14
- 0
Marlin/src/config/examples/wt150/Configuration_adv.h 查看文件

483
 // The timeout (in ms) to return to the status screen from sub-menus
483
 // The timeout (in ms) to return to the status screen from sub-menus
484
 //#define LCD_TIMEOUT_TO_STATUS 15000
484
 //#define LCD_TIMEOUT_TO_STATUS 15000
485
 
485
 
486
+//#define LED_CONTROL_MENU                       // Uncomment to enable the LED control menu option.
487
+#if ENABLED(LED_CONTROL_MENU)
488
+
489
+  #define LED_COLOR_PRESETS                   // Uncomment to enable the preset color menu option.
490
+    #if ENABLED(LED_COLOR_PRESETS)
491
+      #define LED_USER_PRESET_RED       255   // User defined RED value
492
+      #define LED_USER_PRESET_GREEN     128   // User defined GREEN value
493
+      #define LED_USER_PRESET_BLUE        0   // User defined BLUE value
494
+      #define LED_USER_PRESET_WHITE     255   // User defined WHITE value
495
+      #define LED_USER_PRESET_INTENSITY 255   // User defined intensity
496
+    #endif
497
+    //#define LED_USER_PRESET_STARTUP         // Have the printer display the user preset color on startup
498
+#endif // LED_CONTROL_MENU
499
+
486
 #if ENABLED(SDSUPPORT)
500
 #if ENABLED(SDSUPPORT)
487
 
501
 
488
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
502
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work

+ 58
- 13
Marlin/src/feature/leds/leds.cpp 查看文件

30
 
30
 
31
 #include "leds.h"
31
 #include "leds.h"
32
 
32
 
33
+#if ENABLED(LED_CONTROL_MENU)
34
+  #if ENABLED(LED_COLOR_PRESETS)
35
+uint8_t led_intensity_red = LED_USER_PRESET_RED,
36
+        led_intensity_green = LED_USER_PRESET_GREEN,
37
+        led_intensity_blue = LED_USER_PRESET_BLUE
38
+        #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED)
39
+          , led_intensity_white = LED_USER_PRESET_WHITE
40
+        #endif
41
+        #if ENABLED(NEOPIXEL_LED)
42
+          , led_intensity = NEOPIXEL_BRIGHTNESS
43
+        #endif
44
+        ;
45
+  #else
46
+    uint8_t led_intensity_red = 255,
47
+            led_intensity_green = 255,
48
+            led_intensity_blue = 255
49
+            #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED)
50
+              , led_intensity_white = 0
51
+            #endif
52
+            #if ENABLED(NEOPIXEL_LED)
53
+              , led_intensity = NEOPIXEL_BRIGHTNESS
54
+            #endif
55
+            ;
56
+  #endif
57
+#endif
58
+
33
 void set_led_color(
59
 void set_led_color(
34
   const uint8_t r, const uint8_t g, const uint8_t b
60
   const uint8_t r, const uint8_t g, const uint8_t b
35
     #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED)
61
     #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED)
42
 ) {
68
 ) {
43
 
69
 
44
   #if ENABLED(NEOPIXEL_LED)
70
   #if ENABLED(NEOPIXEL_LED)
45
-
46
-    const uint32_t color = pixels.Color(r, g, b, w);
47
-    static uint16_t nextLed = 0;
48
-
49
-    pixels.setBrightness(p);
50
-    if (!isSequence)
51
-      set_neopixel_color(color);
52
-    else {
53
-      pixels.setPixelColor(nextLed, color);
54
-      pixels.show();
55
-      if (++nextLed >= pixels.numPixels()) nextLed = 0;
56
-      return;
71
+    if ((w == 255) || ((r == 255) && (g == 255) && (b == 255))) {
72
+      neopixel_set_led_color(NEO_WHITE, p);
57
     }
73
     }
58
-
74
+    else
75
+      neopixel_set_led_color(r, g, b, w, p);
59
   #endif
76
   #endif
60
 
77
 
61
   #if ENABLED(BLINKM)
78
   #if ENABLED(BLINKM)
81
   #if ENABLED(PCA9632)
98
   #if ENABLED(PCA9632)
82
     pca9632_set_led_color(r, g, b); // Update I2C LED driver
99
     pca9632_set_led_color(r, g, b); // Update I2C LED driver
83
   #endif
100
   #endif
101
+
102
+  #if ENABLED(LED_CONTROL_MENU)
103
+    if ((r + g + b
104
+      #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED)
105
+        + w
106
+      #endif
107
+    ) >= 3) {
108
+      led_intensity_red = r;
109
+      led_intensity_green = g;
110
+      led_intensity_blue = b;
111
+      #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED)
112
+        led_intensity_white = w;
113
+      #endif
114
+      #if ENABLED(NEOPIXEL_LED)
115
+        led_intensity = p;
116
+      #endif
117
+    }
118
+  #endif
119
+}
120
+
121
+void set_led_white(){
122
+  #if ENABLED(NEOPIXEL_LED)
123
+    neopixel_set_led_color(NEO_WHITE, pixels.getBrightness());
124
+  #elif (RGBW_LED)
125
+    set_led_color(0, 0, 0, 255);
126
+  #else
127
+    set_led_color(255, 255, 255);
128
+  #endif
84
 }
129
 }
85
 
130
 
86
 #endif // HAS_COLOR_LEDS
131
 #endif // HAS_COLOR_LEDS

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

65
     #endif
65
     #endif
66
 );
66
 );
67
 
67
 
68
+void set_led_white();
69
+
68
 #endif // __LEDS_H__
70
 #endif // __LEDS_H__

+ 21
- 1
Marlin/src/feature/leds/neopixel.cpp 查看文件

53
     set_neopixel_color(pixels.Color(0, 0, 255, 0));  // blue
53
     set_neopixel_color(pixels.Color(0, 0, 255, 0));  // blue
54
     safe_delay(1000);
54
     safe_delay(1000);
55
   #endif
55
   #endif
56
-  set_neopixel_color(pixels.Color(NEO_WHITE));       // white
56
+
57
+  #if ENABLED(LED_USER_PRESET_STARTUP)
58
+    set_neopixel_color(pixels.Color(LED_USER_PRESET_RED, LED_USER_PRESET_GREEN, LED_USER_PRESET_BLUE, LED_USER_PRESET_WHITE));
59
+  #else
60
+    set_neopixel_color(pixels.Color(0, 0, 0, 0));
61
+  #endif
62
+}
63
+
64
+bool neopixel_set_led_color(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t w, const uint8_t p) {
65
+  const uint32_t color = pixels.Color(r, g, b, w);
66
+  pixels.setBrightness(p);
67
+  #if !ENABLED(NEOPIXEL_IS_SEQUENTIAL)
68
+    set_neopixel_color(color);
69
+    return false;
70
+  #else
71
+    static uint16_t nextLed = 0;
72
+    pixels.setPixelColor(nextLed, color);
73
+    pixels.show();
74
+    if (++nextLed >= pixels.numPixels()) nextLed = 0;
75
+    return true;
76
+  #endif
57
 }
77
 }
58
 
78
 
59
 #endif // NEOPIXEL_LED
79
 #endif // NEOPIXEL_LED

+ 2
- 1
Marlin/src/feature/leds/neopixel.h 查看文件

36
 #define NEOPIXEL_IS_RGBW !NEOPIXEL_IS_RGB
36
 #define NEOPIXEL_IS_RGBW !NEOPIXEL_IS_RGB
37
 
37
 
38
 #if NEOPIXEL_IS_RGB
38
 #if NEOPIXEL_IS_RGB
39
-  #define NEO_WHITE 255, 255, 255
39
+  #define NEO_WHITE 255, 255, 255, 0
40
 #else
40
 #else
41
   #define NEO_WHITE 0, 0, 0, 255
41
   #define NEO_WHITE 0, 0, 0, 255
42
 #endif
42
 #endif
43
 
43
 
44
 void setup_neopixel();
44
 void setup_neopixel();
45
 void set_neopixel_color(const uint32_t color);
45
 void set_neopixel_color(const uint32_t color);
46
+bool neopixel_set_led_color(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t w, const uint8_t p);
46
 
47
 
47
 extern Adafruit_NeoPixel pixels;
48
 extern Adafruit_NeoPixel pixels;
48
 
49
 

+ 54
- 3
Marlin/src/lcd/language/language_en.h 查看文件

174
 #ifndef MSG_USER_MENU
174
 #ifndef MSG_USER_MENU
175
   #define MSG_USER_MENU                       _UxGT("Custom Commands")
175
   #define MSG_USER_MENU                       _UxGT("Custom Commands")
176
 #endif
176
 #endif
177
-
178
 #ifndef MSG_UBL_DOING_G29
177
 #ifndef MSG_UBL_DOING_G29
179
   #define MSG_UBL_DOING_G29                   _UxGT("Doing G29")
178
   #define MSG_UBL_DOING_G29                   _UxGT("Doing G29")
180
 #endif
179
 #endif
361
 #ifndef MSG_UBL_STEP_BY_STEP_MENU
360
 #ifndef MSG_UBL_STEP_BY_STEP_MENU
362
   #define MSG_UBL_STEP_BY_STEP_MENU           _UxGT("Step-By-Step UBL")
361
   #define MSG_UBL_STEP_BY_STEP_MENU           _UxGT("Step-By-Step UBL")
363
 #endif
362
 #endif
364
-
363
+#ifndef MSG_LED_CONTROL
364
+  #define MSG_LED_CONTROL                     _UxGT("LED Control")
365
+#endif
366
+#ifndef MSG_LEDS_OFF
367
+  #define MSG_LEDS_OFF                        _UxGT("Turn Off Lights")
368
+#endif
369
+#ifndef MSG_LED_ON
370
+  #define MSG_LED_ON                          _UxGT("Turn on ")
371
+#endif
372
+#ifndef MSG_RED
373
+  #define MSG_RED                             _UxGT("Red ")
374
+#endif
375
+#ifndef MSG_ORANGE
376
+  #define MSG_ORANGE                          _UxGT("Orange ")
377
+#endif
378
+#ifndef MSG_YELLOW
379
+  #define MSG_YELLOW                          _UxGT("Yellow ")
380
+#endif
381
+#ifndef MSG_GREEN
382
+  #define MSG_GREEN                           _UxGT("Green ")
383
+#endif
384
+#ifndef MSG_BLUE
385
+  #define MSG_BLUE                            _UxGT("Blue ")
386
+#endif
387
+#ifndef MSG_PURPLE
388
+  #define MSG_PURPLE                          _UxGT("Purple ")
389
+#endif
390
+#ifndef MSG_WHITE
391
+  #define MSG_WHITE                           _UxGT("White ")
392
+#endif
393
+#ifndef MSG_CUSTOM
394
+  #define MSG_CUSTOM                          _UxGT("Custom ")
395
+#endif
396
+#ifndef MSG_LED_PRESET
397
+  #define MSG_LED_PRESET                      _UxGT("Preset ")
398
+#endif
399
+#ifndef MSG_LED_DEFAULT
400
+  #define MSG_LED_DEFAULT                     _UxGT("Default ")
401
+#endif
402
+#ifndef MSG_LIGHTS
403
+  #define MSG_LIGHTS                          _UxGT("Lights ")
404
+#endif
405
+#ifndef MSG_LED_INTENSITY
406
+  #define MSG_LED_INTENSITY                   _UxGT("Intensity ")
407
+#endif
408
+#ifndef MSG_LED_CUSTOM
409
+  #define MSG_LED_CUSTOM                      _UxGT("Custom LED")
410
+#endif
411
+#ifndef MSG_LED_SAVE
412
+  #define MSG_LED_SAVE                        _UxGT("Save ")
413
+#endif
414
+#ifndef MSG_LED_LOAD
415
+  #define MSG_LED_LOAD                        _UxGT("Load ")
416
+#endif
365
 #ifndef MSG_MOVING
417
 #ifndef MSG_MOVING
366
   #define MSG_MOVING                          _UxGT("Moving...")
418
   #define MSG_MOVING                          _UxGT("Moving...")
367
 #endif
419
 #endif
839
     #define MSG_INFO_PRINT_FILAMENT           _UxGT("Extruded")
891
     #define MSG_INFO_PRINT_FILAMENT           _UxGT("Extruded")
840
   #endif
892
   #endif
841
 #endif
893
 #endif
842
-
843
 #ifndef MSG_INFO_MIN_TEMP
894
 #ifndef MSG_INFO_MIN_TEMP
844
   #define MSG_INFO_MIN_TEMP                   _UxGT("Min Temp")
895
   #define MSG_INFO_MIN_TEMP                   _UxGT("Min Temp")
845
 #endif
896
 #endif

+ 138
- 0
Marlin/src/lcd/ultralcd.cpp 查看文件

55
   #include "../feature/bedlevel/bedlevel.h"
55
   #include "../feature/bedlevel/bedlevel.h"
56
 #endif
56
 #endif
57
 
57
 
58
+#if ENABLED(LED_CONTROL_MENU)
59
+  #include "../feature/leds/leds.h"
60
+#endif
61
+
58
 // For i2c define BUZZ to use lcd_buzz
62
 // For i2c define BUZZ to use lcd_buzz
59
 #if DISABLED(LCD_USE_I2C_BUZZER)
63
 #if DISABLED(LCD_USE_I2C_BUZZER)
60
   #include "../libs/buzzer.h"
64
   #include "../libs/buzzer.h"
185
     void lcd_info_menu();
189
     void lcd_info_menu();
186
   #endif // LCD_INFO_MENU
190
   #endif // LCD_INFO_MENU
187
 
191
 
192
+  #if ENABLED(LED_CONTROL_MENU)
193
+    void lcd_led_menu();
194
+    void lcd_led_custom_menu();
195
+  #endif
196
+
188
   #if ENABLED(ADVANCED_PAUSE_FEATURE)
197
   #if ENABLED(ADVANCED_PAUSE_FEATURE)
189
     void lcd_advanced_pause_toocold_menu();
198
     void lcd_advanced_pause_toocold_menu();
190
     void lcd_advanced_pause_option_menu();
199
     void lcd_advanced_pause_option_menu();
1014
       MENU_ITEM(submenu, MSG_INFO_MENU, lcd_info_menu);
1023
       MENU_ITEM(submenu, MSG_INFO_MENU, lcd_info_menu);
1015
     #endif
1024
     #endif
1016
 
1025
 
1026
+    #if ENABLED(LED_CONTROL_MENU)
1027
+      MENU_ITEM(submenu, "LED Control", lcd_led_menu);
1028
+    #endif
1017
     END_MENU();
1029
     END_MENU();
1018
   }
1030
   }
1019
 
1031
 
3933
 
3945
 
3934
   /**
3946
   /**
3935
    *
3947
    *
3948
+   * LED Menu
3949
+   *
3950
+   */
3951
+
3952
+  #if ENABLED(LED_CONTROL_MENU)
3953
+
3954
+    bool led_restore_color =
3955
+      #if ENABLED(LED_USER_PRESET_STARTUP)
3956
+        false;
3957
+      #else
3958
+        true;
3959
+      #endif
3960
+
3961
+    extern uint8_t led_intensity_red,
3962
+           led_intensity_green,
3963
+           led_intensity_blue
3964
+           #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED)
3965
+             , led_intensity_white
3966
+           #endif
3967
+           #if ENABLED(NEOPIXEL_LED)
3968
+             , led_intensity
3969
+           #endif
3970
+           ;
3971
+
3972
+    void update_leds() {
3973
+      if (led_restore_color) {
3974
+        #if ENABLED(LED_COLOR_PRESETS)
3975
+          led_intensity_red = LED_USER_PRESET_RED;
3976
+          led_intensity_green = LED_USER_PRESET_GREEN;
3977
+          led_intensity_blue = LED_USER_PRESET_BLUE;
3978
+          #if ENABLED(RGBW_LED)
3979
+            led_intensity_white = LED_USER_PRESET_WHITE;
3980
+          #endif
3981
+          #if ENABLED(NEOPIXEL_LED)
3982
+            led_intensity = LED_USER_PRESET_INTENSITY;
3983
+          #endif
3984
+        #else
3985
+          led_intensity_red = 255;
3986
+          led_intensity_green = 255;
3987
+          led_intensity_blue = 255;
3988
+          #if ENABLED(RGBW_LED)
3989
+            led_intensity_white = 0;
3990
+          #endif
3991
+          #if ENABLED(NEOPIXEL_LED)
3992
+            led_intensity = LED_USER_PRESET_INTENSITY;
3993
+          #endif
3994
+        #endif
3995
+        led_restore_color = false;
3996
+      }
3997
+
3998
+      set_led_color(led_intensity_red, led_intensity_green, led_intensity_blue
3999
+        #if ENABLED(RGBW_LED)
4000
+          , led_intensity_white
4001
+        #endif
4002
+        #if ENABLED(NEOPIXEL_LED)
4003
+          , 0, led_intensity
4004
+        #endif
4005
+        );
4006
+      led_restore_color = false;
4007
+    }
4008
+
4009
+    void led_restore_default() {
4010
+      led_restore_color = true;
4011
+      update_leds();
4012
+    }
4013
+
4014
+    void set_leds_off() {
4015
+      set_led_color(0, 0, 0
4016
+        #if ENABLED(RGBW) || ENABLED(NEOPIXEL_LED)
4017
+        , 0
4018
+        #endif
4019
+        );
4020
+    }
4021
+
4022
+    void lcd_led_red()    { set_led_color(255, 0, 0); }
4023
+    void lcd_led_orange() { set_led_color(150, 60, 0); }
4024
+    void lcd_led_yellow() { set_led_color(255, 255, 0); }
4025
+    void lcd_led_green()  { set_led_color(0, 255, 0); }
4026
+    void lcd_led_blue()   { set_led_color(0, 0, 255); }
4027
+    void lcd_led_purple() { set_led_color(255, 0, 255); }
4028
+
4029
+    void lcd_led_presets_menu() {
4030
+      START_MENU();
4031
+      MENU_BACK(MSG_LED_CONTROL);
4032
+      MENU_ITEM(function, MSG_LED_ON MSG_RED MSG_LIGHTS, lcd_led_red);
4033
+      MENU_ITEM(function, MSG_LED_ON MSG_ORANGE MSG_LIGHTS, lcd_led_orange);
4034
+      MENU_ITEM(function, MSG_LED_ON MSG_YELLOW MSG_LIGHTS,lcd_led_yellow);
4035
+      MENU_ITEM(function, MSG_LED_ON MSG_GREEN MSG_LIGHTS, lcd_led_green);
4036
+      MENU_ITEM(function, MSG_LED_ON MSG_BLUE MSG_LIGHTS, lcd_led_blue);
4037
+      MENU_ITEM(function, MSG_LED_ON MSG_PURPLE MSG_LIGHTS, lcd_led_purple);
4038
+      MENU_ITEM(function, MSG_LED_ON MSG_WHITE MSG_LIGHTS, set_led_white);
4039
+      END_MENU();
4040
+    }
4041
+
4042
+    void lcd_led_custom_menu() {
4043
+      START_MENU();
4044
+      MENU_BACK(MSG_LED_CONTROL);
4045
+      MENU_ITEM_EDIT_CALLBACK(int8, MSG_RED MSG_LED_INTENSITY, &led_intensity_red, 0, 255, update_leds, true);
4046
+      MENU_ITEM_EDIT_CALLBACK(int8, MSG_GREEN MSG_LED_INTENSITY, &led_intensity_green, 0, 255, update_leds, true);
4047
+      MENU_ITEM_EDIT_CALLBACK(int8, MSG_BLUE MSG_LED_INTENSITY, &led_intensity_blue, 0, 255, update_leds, true);
4048
+      #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED)
4049
+        MENU_ITEM_EDIT_CALLBACK(int8, MSG_WHITE MSG_LED_INTENSITY, &led_intensity_white, 0, 255, update_leds, true);
4050
+      #endif
4051
+      #if ENABLED(NEOPIXEL_LED)
4052
+        MENU_ITEM_EDIT_CALLBACK(int8, MSG_LED_INTENSITY, &led_intensity, 0, 255, update_leds, true);
4053
+      #endif
4054
+      END_MENU();
4055
+    }
4056
+
4057
+    void lcd_led_menu() {
4058
+      START_MENU();
4059
+      MENU_BACK(MSG_MAIN);
4060
+      MENU_ITEM(function, MSG_LIGHTS MSG_OFF, set_leds_off); // works
4061
+      MENU_ITEM(function, MSG_LIGHTS MSG_ON, update_leds); // works
4062
+      MENU_ITEM(function, MSG_LED_LOAD MSG_LED_DEFAULT MSG_LIGHTS, led_restore_default); // works
4063
+      #if ENABLED(LED_COLOR_PRESETS)
4064
+        MENU_ITEM(submenu, MSG_LED_PRESET MSG_LIGHTS, lcd_led_presets_menu);
4065
+      #endif
4066
+      MENU_ITEM(submenu, MSG_CUSTOM MSG_LIGHTS, lcd_led_custom_menu);
4067
+      END_MENU();
4068
+    }
4069
+
4070
+  #endif // LED_CONTROL_MENU
4071
+
4072
+  /**
4073
+   *
3936
    * Filament Change Feature Screens
4074
    * Filament Change Feature Screens
3937
    *
4075
    *
3938
    */
4076
    */

Loading…
取消
儲存