Refactor PRINTER_EVENT_LEDS, apply to M303 (#12038)
Co-Authored-By: Giuliano Zaro <gmagician@users.noreply.github.com>
This commit is contained in:
committed by
Scott Lahteine
parent
d8d76cd2ba
commit
d43d4e4219
@@ -1571,7 +1571,9 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
|
||||
* 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 ENABLED(PRINTER_EVENT_LEDS) && !HAS_COLOR_LEDS
|
||||
#error "PRINTER_EVENT_LEDS requires BLINKM, PCA9632, RGB_LED, RGBW_LED or NEOPIXEL_LED."
|
||||
#elif ENABLED(RGB_LED)
|
||||
#if !_RGB_TEST
|
||||
#error "RGB_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, and RGB_LED_B_PIN."
|
||||
#elif ENABLED(RGBW_LED)
|
||||
@@ -1585,8 +1587,6 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
|
||||
#if !(PIN_EXISTS(NEOPIXEL) && NEOPIXEL_PIXELS > 0)
|
||||
#error "NEOPIXEL_LED requires NEOPIXEL_PIN and NEOPIXEL_PIXELS."
|
||||
#endif
|
||||
#elif ENABLED(PRINTER_EVENT_LEDS) && DISABLED(BLINKM) && DISABLED(PCA9632) && DISABLED(NEOPIXEL_LED)
|
||||
#error "PRINTER_EVENT_LEDS requires BLINKM, PCA9632, RGB_LED, RGBW_LED or NEOPIXEL_LED."
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user