🚸 Case Light, LED menus for E3V2 DWIN Enhanced UI (#23590)
This commit is contained in:
@ -78,8 +78,8 @@
|
||||
|
||||
// This helps to implement HAS_ADC_BUTTONS menus
|
||||
#define REVERSE_MENU_DIRECTION
|
||||
#define ENCODER_PULSES_PER_STEP 1
|
||||
#define ENCODER_STEPS_PER_MENU_ITEM 1
|
||||
#define STD_ENCODER_PULSES_PER_STEP 1
|
||||
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
||||
#define ENCODER_FEEDRATE_DEADZONE 2
|
||||
|
||||
#elif ENABLED(ZONESTAR_12864LCD)
|
||||
@ -97,7 +97,7 @@
|
||||
|
||||
#elif ENABLED(RADDS_DISPLAY)
|
||||
#define IS_ULTIPANEL 1
|
||||
#define ENCODER_PULSES_PER_STEP 2
|
||||
#define STD_ENCODER_PULSES_PER_STEP 2
|
||||
|
||||
#elif ANY(miniVIKI, VIKI2, WYH_L12864, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864)
|
||||
|
||||
@ -158,44 +158,19 @@
|
||||
#define IS_RRD_SC 1
|
||||
#define U8GLIB_SH1106
|
||||
|
||||
#define LED_CONTROL_MENU
|
||||
#define NEOPIXEL_LED
|
||||
#undef NEOPIXEL_TYPE
|
||||
#define NEOPIXEL_TYPE NEO_RGB
|
||||
#if NEOPIXEL_PIXELS < 3
|
||||
#undef NEOPIXELS_PIXELS
|
||||
#define NEOPIXEL_PIXELS 3
|
||||
#endif
|
||||
#ifndef NEOPIXEL_BRIGHTNESS
|
||||
#define NEOPIXEL_BRIGHTNESS 127
|
||||
#endif
|
||||
|
||||
#if ENABLED(PSU_CONTROL)
|
||||
#define LED_BACKLIGHT_TIMEOUT 10000
|
||||
#endif
|
||||
|
||||
#elif ANY(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_GENERIC_12864_1_1)
|
||||
|
||||
#define FYSETC_MINI_12864
|
||||
#define DOGLCD
|
||||
#define IS_ULTIPANEL 1
|
||||
#define LED_COLORS_REDUCE_GREEN
|
||||
#if ENABLED(PSU_CONTROL) && EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1)
|
||||
#define LED_BACKLIGHT_TIMEOUT 10000
|
||||
#endif
|
||||
|
||||
// Require LED backlighting enabled
|
||||
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
|
||||
#define RGB_LED
|
||||
#elif ENABLED(FYSETC_MINI_12864_2_1)
|
||||
#define LED_CONTROL_MENU
|
||||
#define NEOPIXEL_LED
|
||||
#undef NEOPIXEL_TYPE
|
||||
#define NEOPIXEL_TYPE NEO_RGB
|
||||
#if NEOPIXEL_PIXELS < 3
|
||||
#undef NEOPIXELS_PIXELS
|
||||
#define NEOPIXEL_PIXELS 3
|
||||
#endif
|
||||
#if ENABLED(FYSETC_MINI_12864_2_1)
|
||||
#ifndef NEOPIXEL_BRIGHTNESS
|
||||
#define NEOPIXEL_BRIGHTNESS 127
|
||||
#endif
|
||||
@ -207,8 +182,8 @@
|
||||
#define IS_ULTIPANEL 1
|
||||
#define U8GLIB_SSD1309
|
||||
#define LCD_RESET_PIN LCD_PINS_D6 // This controller need a reset pin
|
||||
#define ENCODER_PULSES_PER_STEP 4
|
||||
#define ENCODER_STEPS_PER_MENU_ITEM 1
|
||||
#define STD_ENCODER_PULSES_PER_STEP 4
|
||||
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
||||
#ifndef PCA9632
|
||||
#define PCA9632
|
||||
#endif
|
||||
@ -305,8 +280,8 @@
|
||||
#define PCA9632_BUZZER
|
||||
#define PCA9632_BUZZER_DATA { 0x09, 0x02 }
|
||||
|
||||
#define ENCODER_PULSES_PER_STEP 1 // Overlord uses buttons
|
||||
#define ENCODER_STEPS_PER_MENU_ITEM 1
|
||||
#define STD_ENCODER_PULSES_PER_STEP 1 // Overlord uses buttons
|
||||
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
||||
#endif
|
||||
|
||||
// 128x64 I2C OLED LCDs - SSD1306/SSD1309/SH1106
|
||||
|
@ -618,6 +618,8 @@
|
||||
|
||||
#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED)
|
||||
#define HAS_COLOR_LEDS 1
|
||||
#else
|
||||
#undef LED_POWEROFF_TIMEOUT
|
||||
#endif
|
||||
#if ALL(HAS_RESUME_CONTINUE, PRINTER_EVENT_LEDS, SDSUPPORT)
|
||||
#define HAS_LEDS_OFF_FLAG 1
|
||||
@ -738,9 +740,6 @@
|
||||
#endif
|
||||
|
||||
#if EITHER(FYSETC_MINI_12864_2_1, FYSETC_242_OLED_12864)
|
||||
#define LED_CONTROL_MENU
|
||||
#define LED_USER_PRESET_STARTUP
|
||||
#define LED_COLOR_PRESETS
|
||||
#ifndef LED_USER_PRESET_GREEN
|
||||
#define LED_USER_PRESET_GREEN 128
|
||||
#endif
|
||||
@ -981,6 +980,11 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Flags for Case Light having a brightness property
|
||||
#if ENABLED(CASE_LIGHT_ENABLE) && (NONE(CASE_LIGHT_NO_BRIGHTNESS, CASE_LIGHT_IS_COLOR_LED) || ENABLED(CASE_LIGHT_USE_NEOPIXEL))
|
||||
#define CASELIGHT_USES_BRIGHTNESS 1
|
||||
#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
|
||||
|
@ -2330,17 +2330,31 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LED Control Menu
|
||||
* FYSETC LCD Requirements
|
||||
*/
|
||||
#if ENABLED(LED_CONTROL_MENU) && !HAS_COLOR_LEDS
|
||||
#error "LED_CONTROL_MENU requires BLINKM, RGB_LED, RGBW_LED, PCA9533, PCA9632, or NEOPIXEL_LED."
|
||||
#if EITHER(FYSETC_242_OLED_12864, FYSETC_MINI_12864_2_1)
|
||||
#ifndef NEO_RGB
|
||||
#define NEO_RGB 123
|
||||
#define FAUX_RGB 1
|
||||
#endif
|
||||
#if defined(NEOPIXEL_TYPE) && NEOPIXEL_TYPE != NEO_RGB
|
||||
#error "Your FYSETC Mini Panel requires NEOPIXEL_TYPE to be NEO_RGB."
|
||||
#elif defined(NEOPIXEL_PIXELS) && NEOPIXEL_PIXELS < 3
|
||||
#error "Your FYSETC Mini Panel requires NEOPIXEL_PIXELS >= 3."
|
||||
#endif
|
||||
#if FAUX_RGB
|
||||
#undef NEO_RGB
|
||||
#undef FAUX_RGB
|
||||
#endif
|
||||
#elif EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && !DISABLED(RGB_LED)
|
||||
#error "Your FYSETC Mini Panel requires RGB_LED."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LED Backlight Timeout
|
||||
* LED Control Menu requirements
|
||||
*/
|
||||
#if defined(LED_BACKLIGHT_TIMEOUT) && !(ENABLED(PSU_CONTROL) && ANY(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_242_OLED_12864))
|
||||
#error "LED_BACKLIGHT_TIMEOUT requires a FYSETC Mini Panel and a Power Switch."
|
||||
#if ENABLED(LED_CONTROL_MENU) && !HAS_COLOR_LEDS
|
||||
#error "LED_CONTROL_MENU requires BLINKM, RGB_LED, RGBW_LED, PCA9533, PCA9632, or NEOPIXEL_LED."
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -2883,15 +2897,6 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* FYSETC Mini 12864 RGB backlighting required
|
||||
*/
|
||||
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED)
|
||||
#error "RGB_LED is required for FYSETC_MINI_12864 1.2 and 2.0."
|
||||
#elif EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && DISABLED(LED_USER_PRESET_STARTUP)
|
||||
#error "LED_USER_PRESET_STARTUP is required for FYSETC_MINI_12864 2.x displays."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Check existing CS pins against enabled TMC SPI drivers.
|
||||
*/
|
||||
@ -3411,8 +3416,8 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
|
||||
#error "A very large BLOCK_BUFFER_SIZE is not needed and takes longer to drain the buffer on pause / cancel."
|
||||
#endif
|
||||
|
||||
#if ENABLED(LED_CONTROL_MENU) && !IS_ULTIPANEL
|
||||
#error "LED_CONTROL_MENU requires an LCD controller."
|
||||
#if ENABLED(LED_CONTROL_MENU) && NONE(HAS_MARLINUI_MENU, DWIN_CREALITY_LCD_ENHANCED)
|
||||
#error "LED_CONTROL_MENU requires an LCD controller that implements the menu."
|
||||
#endif
|
||||
|
||||
#if ENABLED(CASE_LIGHT_USE_NEOPIXEL) && DISABLED(NEOPIXEL_LED)
|
||||
|
@ -574,6 +574,23 @@
|
||||
#warning "Contrast cannot be changed when LCD_CONTRAST_MIN >= LCD_CONTRAST_MAX."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* FYSETC backlighting
|
||||
*/
|
||||
#if EITHER(FYSETC_242_OLED_12864, FYSETC_MINI_12864_2_1) && !ALL(NEOPIXEL_LED, LED_CONTROL_MENU, LED_USER_PRESET_STARTUP, LED_COLOR_PRESETS)
|
||||
#warning "Your FYSETC Mini Panel works best with NEOPIXEL_LED, LED_CONTROL_MENU, LED_USER_PRESET_STARTUP, and LED_COLOR_PRESETS."
|
||||
#endif
|
||||
|
||||
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED)
|
||||
#warning "Your FYSETC Mini Panel works best with RGB_LED."
|
||||
#elif EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && DISABLED(LED_USER_PRESET_STARTUP)
|
||||
#warning "Your FYSETC Mini Panel works best with LED_USER_PRESET_STARTUP."
|
||||
#endif
|
||||
|
||||
#if EITHER(FYSETC_242_OLED_12864, FYSETC_MINI_12864) && BOTH(PSU_CONTROL, HAS_COLOR_LEDS) && !LED_POWEROFF_TIMEOUT
|
||||
#warning "Your FYSETC display with PSU_CONTROL works best with LED_POWEROFF_TIMEOUT."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Maple environment
|
||||
*/
|
||||
|
Reference in New Issue
Block a user