From 10c57d818963db8ff8cb11bac2dabe47b55ae029 Mon Sep 17 00:00:00 2001 From: I3DBeeTech <129617321+I3DBeeTech@users.noreply.github.com> Date: Sun, 28 May 2023 21:41:10 +0530 Subject: [PATCH 1/4] Neo Pixel LCD Contrast update Enabling MKS_MINI_12864_V3 or BTT_MINI_12864_V1 do enables the FYSETC_MINI_12864_2_1 as common in Conditionals_LCD.h This Require common set of lcd contrast modification from u8g.setContrast(contrast) to u8g.setContrast(255) Hope this condition do the job, that requires no edit during used cases. --- Marlin/src/lcd/dogm/marlinui_DOGM.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index 2552df3b88f4..d570eb2c3d10 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -92,7 +92,11 @@ U8G_CLASS u8g; #endif #if HAS_LCD_CONTRAST - void MarlinUI::_set_contrast() { u8g.setContrast(contrast); } + #if ENABLED (FYSETC_MINI_12864_2_1) + void MarlinUI::_set_contrast() { u8g.setContrast(255); } + #else + void MarlinUI::_set_contrast() { u8g.setContrast(contrast); } + #endif #endif void MarlinUI::set_font(const MarlinFont font_nr) { From 17ae82a1de860c45f9cb7ce77688ba9a1d3c589c Mon Sep 17 00:00:00 2001 From: I3DBeeTech <129617321+I3DBeeTech@users.noreply.github.com> Date: Sun, 28 May 2023 22:03:13 +0530 Subject: [PATCH 2/4] Update marlinui_DOGM.cpp typo --- Marlin/src/lcd/dogm/marlinui_DOGM.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index d570eb2c3d10..ea98f159ad3f 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -92,7 +92,7 @@ U8G_CLASS u8g; #endif #if HAS_LCD_CONTRAST - #if ENABLED (FYSETC_MINI_12864_2_1) + #if EITHER (NEOPIXEL_LED, FYSETC_MINI_12864_2_1) void MarlinUI::_set_contrast() { u8g.setContrast(255); } #else void MarlinUI::_set_contrast() { u8g.setContrast(contrast); } From 0fccaa500ee32acb147e36534caf610ee99b9bbb Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 28 May 2023 16:22:44 -0500 Subject: [PATCH 3/4] FYSETC_MINI_12864_2_1 has no contrast control --- Marlin/src/inc/Conditionals_post.h | 2 +- Marlin/src/lcd/dogm/marlinui_DOGM.cpp | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index d137e1d9c198..30d47b704aff 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -472,7 +472,7 @@ #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #define _LCD_CONTRAST_MIN 120 #define _LCD_CONTRAST_INIT 195 -#elif EITHER(MKS_MINI_12864_V3, BTT_MINI_12864_V1) +#elif ENABLED(FYSETC_MINI_12864_2_1) #define _LCD_CONTRAST_MIN 255 #define _LCD_CONTRAST_INIT 255 #elif ENABLED(FYSETC_MINI_12864) diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index ea98f159ad3f..2552df3b88f4 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -92,11 +92,7 @@ U8G_CLASS u8g; #endif #if HAS_LCD_CONTRAST - #if EITHER (NEOPIXEL_LED, FYSETC_MINI_12864_2_1) - void MarlinUI::_set_contrast() { u8g.setContrast(255); } - #else - void MarlinUI::_set_contrast() { u8g.setContrast(contrast); } - #endif + void MarlinUI::_set_contrast() { u8g.setContrast(contrast); } #endif void MarlinUI::set_font(const MarlinFont font_nr) { From c3886ce7123a718a5ca257b8049225fd9751e586 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 1 Jun 2023 18:24:58 -0500 Subject: [PATCH 4/4] min contrast 230 --- Marlin/src/inc/Conditionals_post.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 30d47b704aff..371b2fd84a68 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -473,7 +473,7 @@ #define _LCD_CONTRAST_MIN 120 #define _LCD_CONTRAST_INIT 195 #elif ENABLED(FYSETC_MINI_12864_2_1) - #define _LCD_CONTRAST_MIN 255 + #define _LCD_CONTRAST_MIN 230 #define _LCD_CONTRAST_INIT 255 #elif ENABLED(FYSETC_MINI_12864) #define _LCD_CONTRAST_MIN 180