RGB Caselight (#20341)

This commit is contained in:
LinFor
2021-02-28 01:06:48 +03:00
committed by GitHub
parent ee7701c15b
commit e0aa9ce372
14 changed files with 86 additions and 41 deletions

View File

@ -506,6 +506,15 @@
#define NEED_HEX_PRINT 1
#endif
// Flags for Case Light having a color property or a single pin
#if ENABLED(CASE_LIGHT_ENABLE)
#if EITHER(CASE_LIGHT_USE_NEOPIXEL, CASE_LIGHT_USE_RGB_LED)
#define CASE_LIGHT_IS_COLOR_LED 1
#else
#define NEED_CASE_LIGHT_PIN 1
#endif
#endif
// Flag whether least_squares_fit.cpp is used
#if ANY(AUTO_BED_LEVELING_UBL, AUTO_BED_LEVELING_LINEAR, Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
#define NEED_LSF 1

View File

@ -437,6 +437,8 @@
#error "DUAL_NOZZLE_DUPLICATION_MODE is now MULTI_NOZZLE_DUPLICATION."
#elif defined(MENU_ITEM_CASE_LIGHT)
#error "MENU_ITEM_CASE_LIGHT is now CASE_LIGHT_MENU."
#elif defined(CASE_LIGHT_NEOPIXEL_COLOR)
#error "CASE_LIGHT_NEOPIXEL_COLOR is now CASE_LIGHT_DEFAULT_COLOR."
#elif defined(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
#error "ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED is now SD_ABORT_ON_ENDSTOP_HIT."
#elif defined(LPC_SD_LCD) || defined(LPC_SD_ONBOARD) || defined(LPC_SD_CUSTOM_CABLE)
@ -1704,9 +1706,9 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
/**
* Case Light requirements
*/
#if ENABLED(CASE_LIGHT_ENABLE)
#if NEED_CASE_LIGHT_PIN
#if !PIN_EXISTS(CASE_LIGHT)
#error "CASE_LIGHT_ENABLE requires CASE_LIGHT_PIN to be defined."
#error "CASE_LIGHT_ENABLE requires CASE_LIGHT_PIN, CASE_LIGHT_USE_NEOPIXEL, or CASE_LIGHT_USE_RGB_LED."
#elif CASE_LIGHT_PIN == FAN_PIN
#error "CASE_LIGHT_PIN conflicts with FAN_PIN. Resolve before continuing."
#endif