♻️ Adjust LCD init, contrast default, settings load
This commit is contained in:
@ -237,7 +237,7 @@
|
||||
#define LCD_HEIGHT 10 // Character lines
|
||||
#define LCD_CONTRAST_MIN 127
|
||||
#define LCD_CONTRAST_MAX 255
|
||||
#define DEFAULT_LCD_CONTRAST 250
|
||||
#define LCD_CONTRAST_DEFAULT 250
|
||||
#define CONVERT_TO_EXT_ASCII // Use extended 128-255 symbols from ASCII table.
|
||||
// At this time present conversion only for cyrillic - bg, ru and uk languages.
|
||||
// First 7 ASCII symbols in panel font must be replaced with Marlin's special symbols.
|
||||
|
@ -376,7 +376,6 @@
|
||||
#elif EITHER(MKS_MINI_12864_V3, BTT_MINI_12864_V1)
|
||||
#define _LCD_CONTRAST_MIN 255
|
||||
#define _LCD_CONTRAST_INIT 255
|
||||
#define _LCD_CONTRAST_MAX 255
|
||||
#elif ENABLED(FYSETC_MINI_12864)
|
||||
#define _LCD_CONTRAST_INIT 220
|
||||
#elif ENABLED(ULTI_CONTROLLER)
|
||||
@ -389,18 +388,12 @@
|
||||
#elif ENABLED(ZONESTAR_12864OLED)
|
||||
#define _LCD_CONTRAST_MIN 64
|
||||
#define _LCD_CONTRAST_INIT 128
|
||||
#define _LCD_CONTRAST_MAX 255
|
||||
#elif IS_TFTGLCD_PANEL
|
||||
#define _LCD_CONTRAST_MIN 0
|
||||
#define _LCD_CONTRAST_INIT 250
|
||||
#define _LCD_CONTRAST_MAX 255
|
||||
#endif
|
||||
|
||||
#ifdef _LCD_CONTRAST_INIT
|
||||
#define HAS_LCD_CONTRAST 1
|
||||
#endif
|
||||
|
||||
#if HAS_LCD_CONTRAST
|
||||
#ifndef LCD_CONTRAST_MIN
|
||||
#ifdef _LCD_CONTRAST_MIN
|
||||
#define LCD_CONTRAST_MIN _LCD_CONTRAST_MIN
|
||||
@ -420,8 +413,8 @@
|
||||
#define LCD_CONTRAST_MAX 63 // ST7567 6-bits contrast
|
||||
#endif
|
||||
#endif
|
||||
#ifndef DEFAULT_LCD_CONTRAST
|
||||
#define DEFAULT_LCD_CONTRAST LCD_CONTRAST_INIT
|
||||
#ifndef LCD_CONTRAST_DEFAULT
|
||||
#define LCD_CONTRAST_DEFAULT LCD_CONTRAST_INIT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -559,3 +559,7 @@
|
||||
#if CANNOT_EMBED_CONFIGURATION
|
||||
#warning "Disabled CONFIGURATION_EMBEDDING because the target usually has less flash storage. Define FORCE_CONFIG_EMBED to override."
|
||||
#endif
|
||||
|
||||
#if HAS_LCD_CONTRAST && LCD_CONTRAST_MIN >= LCD_CONTRAST_MAX
|
||||
#warning "Contrast cannot be changed when LCD_CONTRAST_MIN >= LCD_CONTRAST_MAX."
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user