diff --git a/Marlin/Conditionals_LCD.h b/Marlin/Conditionals_LCD.h index 356a61bbec..d69b1b1ec7 100644 --- a/Marlin/Conditionals_LCD.h +++ b/Marlin/Conditionals_LCD.h @@ -386,6 +386,6 @@ #define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)) #define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER)) - #define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED)) + #define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)) #endif //CONDITIONALS_LCD_H diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 4152d7d33e..cc57bff662 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1532,10 +1532,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1549,7 +1551,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 64c0bbe368..1f43b228b1 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -947,7 +947,12 @@ void servo_init() { #if HAS_COLOR_LEDS - void set_led_color(const uint8_t r, const uint8_t g, const uint8_t b) { + void set_led_color( + const uint8_t r, const uint8_t g, const uint8_t b + #if ENABLED(RGBW_LED) + , const uint8_t w=0 + #endif + ) { #if ENABLED(BLINKM) @@ -965,6 +970,11 @@ void servo_init() { analogWrite(RGB_LED_G_PIN, g); analogWrite(RGB_LED_B_PIN, b); + #if ENABLED(RGBW_LED) + digitalWrite(RGB_LED_W_PIN, w ? HIGH : LOW); + analogWrite(RGB_LED_W_PIN, w); + #endif + #endif } @@ -1156,7 +1166,7 @@ inline void get_serial_commands() { card.printingHasFinished(); #if ENABLED(PRINTER_EVENT_LEDS) LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS); - set_led_color(0, 255, 0); + set_led_color(0, 255, 0); // Green #if HAS_RESUME_CONTINUE KEEPALIVE_STATE(PAUSED_FOR_USER); wait_for_user = true; @@ -1165,7 +1175,7 @@ inline void get_serial_commands() { #else safe_delay(1000); #endif - set_led_color(0, 0, 0); + set_led_color(0, 0, 0); // OFF #endif card.checkautostart(true); } @@ -6199,7 +6209,11 @@ inline void gcode_M109() { if (wait_for_heatup) { LCD_MESSAGEPGM(MSG_HEATING_COMPLETE); #if ENABLED(PRINTER_EVENT_LEDS) - set_led_color(255, 255, 255); // Set LEDs ALL WHITE + #if ENABLED(RGBW_LED) + set_led_color(0, 0, 0, 255); // Turn on the WHITE LED + #else + set_led_color(255, 255, 255); // Set LEDs All On + #endif #endif } @@ -6844,9 +6858,9 @@ inline void gcode_M121() { endstops.enable_globally(false); } #if HAS_COLOR_LEDS /** - * M150: Set Status LED Color - Use R-U-B for R-G-B + * M150: Set Status LED Color - Use R-U-B-W for R-G-B-W * - * Always sets all 3 components. If a component is left out, set to 0. + * Always sets all 3 or 4 components. If a component is left out, set to 0. * * Examples: * @@ -6854,6 +6868,7 @@ inline void gcode_M121() { endstops.enable_globally(false); } * M150 R255 U127 ; Turn LED orange (PWM only) * M150 ; Turn LED off * M150 R U B ; Turn LED white + * M150 W ; Turn LED white using a white LED * */ inline void gcode_M150() { @@ -6861,6 +6876,9 @@ inline void gcode_M121() { endstops.enable_globally(false); } code_seen('R') ? (code_has_value() ? code_value_byte() : 255) : 0, code_seen('U') ? (code_has_value() ? code_value_byte() : 255) : 0, code_seen('B') ? (code_has_value() ? code_value_byte() : 255) : 0 + #if ENABLED(RGBW_LED) + , code_seen('W') ? (code_has_value() ? code_value_byte() : 255) : 0 + #endif ); } diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index 3464abe922..b2e271aa17 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -34,10 +34,10 @@ #endif /** - * We try our best to include sanity checks for all the changes configuration - * directives because people have a tendency to use outdated config files with - * the bleding edge source code, but sometimes this is not enough. This check - * will force a minimum config file revision, otherwise Marlin will not build. + * We try our best to include sanity checks for all changed configuration + * directives because users have a tendency to use outdated config files with + * the bleeding-edge source code, but sometimes this is not enough. This check + * forces a minimum config file revision. Otherwise Marlin will not build. */ #if ! defined(CONFIGURATION_H_VERSION) || CONFIGURATION_H_VERSION < REQUIRED_CONFIGURATION_H_VERSION #error "You are using an old Configuration.h file, update it before building Marlin." @@ -951,14 +951,23 @@ static_assert(1 >= 0 /** * RGB_LED Requirements */ +#define _RGB_TEST (PIN_EXISTS(RGB_LED_R) && PIN_EXISTS(RGB_LED_G) && PIN_EXISTS(RGB_LED_B)) #if ENABLED(RGB_LED) - #if !(PIN_EXISTS(RGB_LED_R) && PIN_EXISTS(RGB_LED_G) && PIN_EXISTS(RGB_LED_B)) + #if !_RGB_TEST #error "RGB_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, and RGB_LED_B_PIN." + #elif ENABLED(RGBW_LED) + #error "Please enable only one of RGB_LED and RGBW_LED." #elif ENABLED(BLINKM) #error "RGB_LED and BLINKM are currently incompatible (both use M150)." #endif +#elif ENABLED(RGBW_LED) + #if !(_RGB_TEST && PIN_EXISTS(RGB_LED_W)) + #error "RGBW_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, RGB_LED_B_PIN, and RGB_LED_W_PIN." + #elif ENABLED(BLINKM) + #error "RGBW_LED and BLINKM are currently incompatible (both use M150)." + #endif #elif DISABLED(BLINKM) && ENABLED(PRINTER_EVENT_LEDS) - #error "PRINTER_EVENT_LEDS requires BLINKM or RGB_LED." + #error "PRINTER_EVENT_LEDS requires BLINKM, RGB_LED, or RGBW_LED." #endif /** diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index 9d2bc2a339..6a2382fa46 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -1531,10 +1531,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1548,7 +1550,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 2b670d4e04..f7cf0e3241 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -1515,10 +1515,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1532,7 +1534,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index f5299dea1c..96b9eb19c8 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -1515,10 +1515,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1532,7 +1534,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 9b5a049385..5488cf6e7c 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -1523,10 +1523,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1540,7 +1542,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index 9af69e5786..277bf53645 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -1526,10 +1526,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1543,7 +1545,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 747096f6ba..be48f771d3 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -1566,10 +1566,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1583,7 +1585,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/K8400/Configuration.h b/Marlin/example_configurations/K8400/Configuration.h index 89e4334126..9456590004 100644 --- a/Marlin/example_configurations/K8400/Configuration.h +++ b/Marlin/example_configurations/K8400/Configuration.h @@ -1532,10 +1532,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1549,7 +1551,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/K8400/Dual-head/Configuration.h index 677ee815d4..4a4d29dc13 100644 --- a/Marlin/example_configurations/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/K8400/Dual-head/Configuration.h @@ -1532,10 +1532,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1549,7 +1551,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 48c9ed6190..6b521ff03a 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -1532,10 +1532,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1549,7 +1551,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 0d35e7a519..b5b3363169 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -1533,10 +1533,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1550,7 +1552,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index fac1e5109f..b116d9f9ab 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -1547,10 +1547,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1564,7 +1566,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index 9b4d171391..4960cf1d5c 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -1552,10 +1552,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1569,7 +1571,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/TinyBoy2/Configuration.h b/Marlin/example_configurations/TinyBoy2/Configuration.h index 4ac0360691..8fce9fa979 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration.h @@ -1588,10 +1588,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1605,7 +1607,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 46dd900e80..ffa1fe60ab 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -1523,10 +1523,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1540,7 +1542,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 565d6eeffc..eaf532eb26 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -1532,10 +1532,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1549,7 +1551,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h b/Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h index add835d340..d66f45e2f0 100644 --- a/Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h @@ -1648,10 +1648,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1665,7 +1667,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 2ea7d06bdf..4716101a37 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -1634,10 +1634,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1651,7 +1653,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index ddcba6c0d6..dd3f38b56b 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -1630,10 +1630,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1647,7 +1649,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 15afad44b0..78717d4283 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -1638,10 +1638,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1655,7 +1657,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index d39454e442..60610f7dce 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -1645,10 +1645,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1662,7 +1664,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 1f642c46f2..25090738e9 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -1535,10 +1535,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1552,7 +1554,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index e51ddf2c67..9fe6a9160f 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -1528,10 +1528,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1545,7 +1547,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/wt150/Configuration.h b/Marlin/example_configurations/wt150/Configuration.h index 5bf1ca45fb..83f517fa63 100644 --- a/Marlin/example_configurations/wt150/Configuration.h +++ b/Marlin/example_configurations/wt150/Configuration.h @@ -1521,10 +1521,27 @@ // Support for an RGB LED using 3 separate pins with optional PWM //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 +#endif + +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - Change to green once print has finished + * - Turn off after the print has finished and the user has pushed a button + */ +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) + #define PRINTER_EVENT_LEDS #endif /*********************************************************************\