From cf0f78336b7557f7aca81e841c1e6b74c3f1be07 Mon Sep 17 00:00:00 2001 From: Tannoo Date: Thu, 9 Nov 2017 16:39:01 -0700 Subject: [PATCH] New Feature: LED_CONTROL_MENU --- Marlin/Configuration_adv.h | 15 ++ Marlin/src/config/default/Configuration_adv.h | 14 ++ .../AlephObjects/TAZ4/Configuration_adv.h | 14 ++ .../examples/Anet/A6/Configuration_adv.h | 14 ++ .../examples/Anet/A8/Configuration_adv.h | 14 ++ .../examples/Azteeg/X5GT/Configuration_adv.h | 14 ++ .../examples/BQ/Hephestos/Configuration_adv.h | 14 ++ .../BQ/Hephestos_2/Configuration_adv.h | 14 ++ .../examples/BQ/WITBOX/Configuration_adv.h | 14 ++ .../examples/Cartesio/Configuration_adv.h | 14 ++ .../Creality/CR-10/Configuration_adv.h | 14 ++ .../config/examples/Felix/Configuration_adv.h | 14 ++ .../FolgerTech/i3-2020/Configuration_adv.h | 14 ++ .../Infitary/i3-M508/Configuration_adv.h | 14 ++ .../examples/Malyan/M150/Configuration_adv.h | 14 ++ .../Micromake/C1/enhanced/Configuration_adv.h | 14 ++ .../examples/Mks/Sbase/Configuration_adv.h | 14 ++ .../examples/RigidBot/Configuration_adv.h | 14 ++ .../config/examples/SCARA/Configuration_adv.h | 14 ++ .../examples/Sanguinololu/Configuration_adv.h | 14 ++ .../examples/TinyBoy2/Configuration_adv.h | 14 ++ .../UltiMachine/Archim2/Configuration_adv.h | 14 ++ .../Velleman/K8200/Configuration_adv.h | 14 ++ .../Velleman/K8400/Configuration_adv.h | 14 ++ .../FLSUN/auto_calibrate/Configuration_adv.h | 14 ++ .../FLSUN/kossel_mini/Configuration_adv.h | 14 ++ .../delta/generic/Configuration_adv.h | 14 ++ .../delta/kossel_mini/Configuration_adv.h | 14 ++ .../delta/kossel_pro/Configuration_adv.h | 14 ++ .../delta/kossel_xl/Configuration_adv.h | 14 ++ .../gCreate/gMax1.5+/Configuration_adv.h | 14 ++ .../examples/makibox/Configuration_adv.h | 14 ++ .../tvrrug/Round2/Configuration_adv.h | 14 ++ .../config/examples/wt150/Configuration_adv.h | 14 ++ Marlin/src/feature/leds/leds.cpp | 71 +++++++-- Marlin/src/feature/leds/leds.h | 2 + Marlin/src/feature/leds/neopixel.cpp | 22 ++- Marlin/src/feature/leds/neopixel.h | 3 +- Marlin/src/lcd/language/language_en.h | 57 +++++++- Marlin/src/lcd/ultralcd.cpp | 138 ++++++++++++++++++ 40 files changed, 752 insertions(+), 18 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index fbbb21d416..7894c7da5d 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -482,6 +482,21 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup + #endif +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index fbbb21d416..b472f061a1 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index aaef371f2c..9e48386564 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index ff9a8b40d0..6657489819 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 2034846532..c2bffc8a5a 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h index f6a9abbce9..436b95ca3b 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h @@ -483,6 +483,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index 007652f865..02de527b33 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h index f5adb37180..e382c4c3b6 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index 007652f865..02de527b33 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index 82e4ff63dd..d60c395b25 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h index fe5add0c67..d4b85d0092 100644 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index 17719cee01..119e86e058 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h index baa7a278fb..726c398e44 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h index 21519c30b4..f17dcdea7b 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index c3b0b911a8..4a467b94bb 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h index c8f092df2e..58dd452df6 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index caa6590385..743eb91b54 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -483,6 +483,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index 4ff47fd90a..93b450c68f 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index b0756f7912..3a4cf53296 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index d6da256f98..49a04bc0b8 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -471,6 +471,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index 22c845e359..1ff50eb0d7 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h index d9aef183d9..ed1b1ead59 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index 98959a683f..2dc6e19b9e 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -495,6 +495,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index 3ab9051631..8c788c9ddd 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -483,6 +483,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index 4850ad7a94..217d29c44c 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -484,6 +484,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index 8663f5e32b..ef8778f44c 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -484,6 +484,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index 8663f5e32b..ef8778f44c 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -484,6 +484,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h index 8663f5e32b..ef8778f44c 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -484,6 +484,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h index 46c4999cca..1cc9d1f4cb 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -489,6 +489,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h index 66dd6700f4..7cbc9791ca 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -484,6 +484,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h index 59b861ed4d..5a2ffd3e4d 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index 3bc38c7459..8e5aa309ad 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index c1e303af39..3edfa9a3ef 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -482,6 +482,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index ad2f3b894f..54f72fb07b 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -483,6 +483,20 @@ // The timeout (in ms) to return to the status screen from sub-menus //#define LCD_TIMEOUT_TO_STATUS 15000 +//#define LED_CONTROL_MENU // Uncomment to enable the LED control menu option. +#if ENABLED(LED_CONTROL_MENU) + + #define LED_COLOR_PRESETS // Uncomment to enable the preset color menu option. + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_INTENSITY 255 // User defined intensity + #endif + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup +#endif // LED_CONTROL_MENU + #if ENABLED(SDSUPPORT) // Some RAMPS and other boards don't detect when an SD card is inserted. You can work diff --git a/Marlin/src/feature/leds/leds.cpp b/Marlin/src/feature/leds/leds.cpp index b412bdc70c..456a6442c9 100644 --- a/Marlin/src/feature/leds/leds.cpp +++ b/Marlin/src/feature/leds/leds.cpp @@ -30,6 +30,32 @@ #include "leds.h" +#if ENABLED(LED_CONTROL_MENU) + #if ENABLED(LED_COLOR_PRESETS) +uint8_t led_intensity_red = LED_USER_PRESET_RED, + led_intensity_green = LED_USER_PRESET_GREEN, + led_intensity_blue = LED_USER_PRESET_BLUE + #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED) + , led_intensity_white = LED_USER_PRESET_WHITE + #endif + #if ENABLED(NEOPIXEL_LED) + , led_intensity = NEOPIXEL_BRIGHTNESS + #endif + ; + #else + uint8_t led_intensity_red = 255, + led_intensity_green = 255, + led_intensity_blue = 255 + #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED) + , led_intensity_white = 0 + #endif + #if ENABLED(NEOPIXEL_LED) + , led_intensity = NEOPIXEL_BRIGHTNESS + #endif + ; + #endif +#endif + void set_led_color( const uint8_t r, const uint8_t g, const uint8_t b #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED) @@ -42,20 +68,11 @@ void set_led_color( ) { #if ENABLED(NEOPIXEL_LED) - - const uint32_t color = pixels.Color(r, g, b, w); - static uint16_t nextLed = 0; - - pixels.setBrightness(p); - if (!isSequence) - set_neopixel_color(color); - else { - pixels.setPixelColor(nextLed, color); - pixels.show(); - if (++nextLed >= pixels.numPixels()) nextLed = 0; - return; + if ((w == 255) || ((r == 255) && (g == 255) && (b == 255))) { + neopixel_set_led_color(NEO_WHITE, p); } - + else + neopixel_set_led_color(r, g, b, w, p); #endif #if ENABLED(BLINKM) @@ -81,6 +98,34 @@ void set_led_color( #if ENABLED(PCA9632) pca9632_set_led_color(r, g, b); // Update I2C LED driver #endif + + #if ENABLED(LED_CONTROL_MENU) + if ((r + g + b + #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED) + + w + #endif + ) >= 3) { + led_intensity_red = r; + led_intensity_green = g; + led_intensity_blue = b; + #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED) + led_intensity_white = w; + #endif + #if ENABLED(NEOPIXEL_LED) + led_intensity = p; + #endif + } + #endif +} + +void set_led_white(){ + #if ENABLED(NEOPIXEL_LED) + neopixel_set_led_color(NEO_WHITE, pixels.getBrightness()); + #elif (RGBW_LED) + set_led_color(0, 0, 0, 255); + #else + set_led_color(255, 255, 255); + #endif } #endif // HAS_COLOR_LEDS diff --git a/Marlin/src/feature/leds/leds.h b/Marlin/src/feature/leds/leds.h index 81c822666a..1691593445 100644 --- a/Marlin/src/feature/leds/leds.h +++ b/Marlin/src/feature/leds/leds.h @@ -65,4 +65,6 @@ void set_led_color( #endif ); +void set_led_white(); + #endif // __LEDS_H__ diff --git a/Marlin/src/feature/leds/neopixel.cpp b/Marlin/src/feature/leds/neopixel.cpp index ae06e9b009..5e32f5277a 100644 --- a/Marlin/src/feature/leds/neopixel.cpp +++ b/Marlin/src/feature/leds/neopixel.cpp @@ -53,7 +53,27 @@ void setup_neopixel() { set_neopixel_color(pixels.Color(0, 0, 255, 0)); // blue safe_delay(1000); #endif - set_neopixel_color(pixels.Color(NEO_WHITE)); // white + + #if ENABLED(LED_USER_PRESET_STARTUP) + set_neopixel_color(pixels.Color(LED_USER_PRESET_RED, LED_USER_PRESET_GREEN, LED_USER_PRESET_BLUE, LED_USER_PRESET_WHITE)); + #else + set_neopixel_color(pixels.Color(0, 0, 0, 0)); + #endif +} + +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) { + const uint32_t color = pixels.Color(r, g, b, w); + pixels.setBrightness(p); + #if !ENABLED(NEOPIXEL_IS_SEQUENTIAL) + set_neopixel_color(color); + return false; + #else + static uint16_t nextLed = 0; + pixels.setPixelColor(nextLed, color); + pixels.show(); + if (++nextLed >= pixels.numPixels()) nextLed = 0; + return true; + #endif } #endif // NEOPIXEL_LED diff --git a/Marlin/src/feature/leds/neopixel.h b/Marlin/src/feature/leds/neopixel.h index 2b937f1b87..28ea61d302 100644 --- a/Marlin/src/feature/leds/neopixel.h +++ b/Marlin/src/feature/leds/neopixel.h @@ -36,13 +36,14 @@ #define NEOPIXEL_IS_RGBW !NEOPIXEL_IS_RGB #if NEOPIXEL_IS_RGB - #define NEO_WHITE 255, 255, 255 + #define NEO_WHITE 255, 255, 255, 0 #else #define NEO_WHITE 0, 0, 0, 255 #endif void setup_neopixel(); void set_neopixel_color(const uint32_t color); +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); extern Adafruit_NeoPixel pixels; diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 580d1cb379..a0ffe1e49f 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -174,7 +174,6 @@ #ifndef MSG_USER_MENU #define MSG_USER_MENU _UxGT("Custom Commands") #endif - #ifndef MSG_UBL_DOING_G29 #define MSG_UBL_DOING_G29 _UxGT("Doing G29") #endif @@ -361,7 +360,60 @@ #ifndef MSG_UBL_STEP_BY_STEP_MENU #define MSG_UBL_STEP_BY_STEP_MENU _UxGT("Step-By-Step UBL") #endif - +#ifndef MSG_LED_CONTROL + #define MSG_LED_CONTROL _UxGT("LED Control") +#endif +#ifndef MSG_LEDS_OFF + #define MSG_LEDS_OFF _UxGT("Turn Off Lights") +#endif +#ifndef MSG_LED_ON + #define MSG_LED_ON _UxGT("Turn on ") +#endif +#ifndef MSG_RED + #define MSG_RED _UxGT("Red ") +#endif +#ifndef MSG_ORANGE + #define MSG_ORANGE _UxGT("Orange ") +#endif +#ifndef MSG_YELLOW + #define MSG_YELLOW _UxGT("Yellow ") +#endif +#ifndef MSG_GREEN + #define MSG_GREEN _UxGT("Green ") +#endif +#ifndef MSG_BLUE + #define MSG_BLUE _UxGT("Blue ") +#endif +#ifndef MSG_PURPLE + #define MSG_PURPLE _UxGT("Purple ") +#endif +#ifndef MSG_WHITE + #define MSG_WHITE _UxGT("White ") +#endif +#ifndef MSG_CUSTOM + #define MSG_CUSTOM _UxGT("Custom ") +#endif +#ifndef MSG_LED_PRESET + #define MSG_LED_PRESET _UxGT("Preset ") +#endif +#ifndef MSG_LED_DEFAULT + #define MSG_LED_DEFAULT _UxGT("Default ") +#endif +#ifndef MSG_LIGHTS + #define MSG_LIGHTS _UxGT("Lights ") +#endif +#ifndef MSG_LED_INTENSITY + #define MSG_LED_INTENSITY _UxGT("Intensity ") +#endif +#ifndef MSG_LED_CUSTOM + #define MSG_LED_CUSTOM _UxGT("Custom LED") +#endif +#ifndef MSG_LED_SAVE + #define MSG_LED_SAVE _UxGT("Save ") +#endif +#ifndef MSG_LED_LOAD + #define MSG_LED_LOAD _UxGT("Load ") +#endif #ifndef MSG_MOVING #define MSG_MOVING _UxGT("Moving...") #endif @@ -839,7 +891,6 @@ #define MSG_INFO_PRINT_FILAMENT _UxGT("Extruded") #endif #endif - #ifndef MSG_INFO_MIN_TEMP #define MSG_INFO_MIN_TEMP _UxGT("Min Temp") #endif diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index 239b262290..06adb16d79 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -55,6 +55,10 @@ #include "../feature/bedlevel/bedlevel.h" #endif +#if ENABLED(LED_CONTROL_MENU) + #include "../feature/leds/leds.h" +#endif + // For i2c define BUZZ to use lcd_buzz #if DISABLED(LCD_USE_I2C_BUZZER) #include "../libs/buzzer.h" @@ -185,6 +189,11 @@ uint16_t max_display_update_time = 0; void lcd_info_menu(); #endif // LCD_INFO_MENU + #if ENABLED(LED_CONTROL_MENU) + void lcd_led_menu(); + void lcd_led_custom_menu(); + #endif + #if ENABLED(ADVANCED_PAUSE_FEATURE) void lcd_advanced_pause_toocold_menu(); void lcd_advanced_pause_option_menu(); @@ -1014,6 +1023,9 @@ void kill_screen(const char* lcd_msg) { MENU_ITEM(submenu, MSG_INFO_MENU, lcd_info_menu); #endif + #if ENABLED(LED_CONTROL_MENU) + MENU_ITEM(submenu, "LED Control", lcd_led_menu); + #endif END_MENU(); } @@ -3931,6 +3943,132 @@ void kill_screen(const char* lcd_msg) { } #endif // LCD_INFO_MENU + /** + * + * LED Menu + * + */ + + #if ENABLED(LED_CONTROL_MENU) + + bool led_restore_color = + #if ENABLED(LED_USER_PRESET_STARTUP) + false; + #else + true; + #endif + + extern uint8_t led_intensity_red, + led_intensity_green, + led_intensity_blue + #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED) + , led_intensity_white + #endif + #if ENABLED(NEOPIXEL_LED) + , led_intensity + #endif + ; + + void update_leds() { + if (led_restore_color) { + #if ENABLED(LED_COLOR_PRESETS) + led_intensity_red = LED_USER_PRESET_RED; + led_intensity_green = LED_USER_PRESET_GREEN; + led_intensity_blue = LED_USER_PRESET_BLUE; + #if ENABLED(RGBW_LED) + led_intensity_white = LED_USER_PRESET_WHITE; + #endif + #if ENABLED(NEOPIXEL_LED) + led_intensity = LED_USER_PRESET_INTENSITY; + #endif + #else + led_intensity_red = 255; + led_intensity_green = 255; + led_intensity_blue = 255; + #if ENABLED(RGBW_LED) + led_intensity_white = 0; + #endif + #if ENABLED(NEOPIXEL_LED) + led_intensity = LED_USER_PRESET_INTENSITY; + #endif + #endif + led_restore_color = false; + } + + set_led_color(led_intensity_red, led_intensity_green, led_intensity_blue + #if ENABLED(RGBW_LED) + , led_intensity_white + #endif + #if ENABLED(NEOPIXEL_LED) + , 0, led_intensity + #endif + ); + led_restore_color = false; + } + + void led_restore_default() { + led_restore_color = true; + update_leds(); + } + + void set_leds_off() { + set_led_color(0, 0, 0 + #if ENABLED(RGBW) || ENABLED(NEOPIXEL_LED) + , 0 + #endif + ); + } + + void lcd_led_red() { set_led_color(255, 0, 0); } + void lcd_led_orange() { set_led_color(150, 60, 0); } + void lcd_led_yellow() { set_led_color(255, 255, 0); } + void lcd_led_green() { set_led_color(0, 255, 0); } + void lcd_led_blue() { set_led_color(0, 0, 255); } + void lcd_led_purple() { set_led_color(255, 0, 255); } + + void lcd_led_presets_menu() { + START_MENU(); + MENU_BACK(MSG_LED_CONTROL); + MENU_ITEM(function, MSG_LED_ON MSG_RED MSG_LIGHTS, lcd_led_red); + MENU_ITEM(function, MSG_LED_ON MSG_ORANGE MSG_LIGHTS, lcd_led_orange); + MENU_ITEM(function, MSG_LED_ON MSG_YELLOW MSG_LIGHTS,lcd_led_yellow); + MENU_ITEM(function, MSG_LED_ON MSG_GREEN MSG_LIGHTS, lcd_led_green); + MENU_ITEM(function, MSG_LED_ON MSG_BLUE MSG_LIGHTS, lcd_led_blue); + MENU_ITEM(function, MSG_LED_ON MSG_PURPLE MSG_LIGHTS, lcd_led_purple); + MENU_ITEM(function, MSG_LED_ON MSG_WHITE MSG_LIGHTS, set_led_white); + END_MENU(); + } + + void lcd_led_custom_menu() { + START_MENU(); + MENU_BACK(MSG_LED_CONTROL); + MENU_ITEM_EDIT_CALLBACK(int8, MSG_RED MSG_LED_INTENSITY, &led_intensity_red, 0, 255, update_leds, true); + MENU_ITEM_EDIT_CALLBACK(int8, MSG_GREEN MSG_LED_INTENSITY, &led_intensity_green, 0, 255, update_leds, true); + MENU_ITEM_EDIT_CALLBACK(int8, MSG_BLUE MSG_LED_INTENSITY, &led_intensity_blue, 0, 255, update_leds, true); + #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_LED) + MENU_ITEM_EDIT_CALLBACK(int8, MSG_WHITE MSG_LED_INTENSITY, &led_intensity_white, 0, 255, update_leds, true); + #endif + #if ENABLED(NEOPIXEL_LED) + MENU_ITEM_EDIT_CALLBACK(int8, MSG_LED_INTENSITY, &led_intensity, 0, 255, update_leds, true); + #endif + END_MENU(); + } + + void lcd_led_menu() { + START_MENU(); + MENU_BACK(MSG_MAIN); + MENU_ITEM(function, MSG_LIGHTS MSG_OFF, set_leds_off); // works + MENU_ITEM(function, MSG_LIGHTS MSG_ON, update_leds); // works + MENU_ITEM(function, MSG_LED_LOAD MSG_LED_DEFAULT MSG_LIGHTS, led_restore_default); // works + #if ENABLED(LED_COLOR_PRESETS) + MENU_ITEM(submenu, MSG_LED_PRESET MSG_LIGHTS, lcd_led_presets_menu); + #endif + MENU_ITEM(submenu, MSG_CUSTOM MSG_LIGHTS, lcd_led_custom_menu); + END_MENU(); + } + + #endif // LED_CONTROL_MENU + /** * * Filament Change Feature Screens