Skip to content

Commit 72d7bbb

Browse files
committed
🔧 Sanity checks for Ender 3 V2
1 parent 253f917 commit 72d7bbb

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

Marlin/src/inc/SanityCheck.h

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,8 +1750,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
17501750
* LCD_BED_LEVELING requirements
17511751
*/
17521752
#if ENABLED(LCD_BED_LEVELING)
1753-
#if !HAS_LCD_MENU
1754-
#error "LCD_BED_LEVELING requires a programmable LCD controller."
1753+
#if NONE(HAS_LCD_MENU, DWIN_CREALITY_LCD)
1754+
#error "LCD_BED_LEVELING is not supported by the selected LCD controller."
17551755
#elif !(ENABLED(MESH_BED_LEVELING) || HAS_ABL_NOT_UBL)
17561756
#error "LCD_BED_LEVELING requires MESH_BED_LEVELING or AUTO_BED_LEVELING."
17571757
#elif ENABLED(MESH_EDIT_MENU) && !HAS_MESH
@@ -2656,8 +2656,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
26562656
+ (ENABLED(IS_LEGACY_TFT) && COUNT_ENABLED(TFT_320x240, TFT_320x240_SPI, TFT_480x320, TFT_480x320_SPI)) \
26572657
+ COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35) \
26582658
+ COUNT_ENABLED(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS) \
2659-
+ COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY, DWIN_CREALITY_LCD) \
2660-
+ COUNT_ENABLED(DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \
2659+
+ COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY) \
2660+
+ COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \
26612661
+ COUNT_ENABLED(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) \
26622662
+ COUNT_ENABLED(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004) \
26632663
+ COUNT_ENABLED(MKS_12864OLED, MKS_12864OLED_SSD1306) \
@@ -2750,6 +2750,23 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
27502750
#error "Please select only one of CHIRON_TFT_STANDARD or CHIRON_TFT_NEW."
27512751
#endif
27522752

2753+
/**
2754+
* Ender 3 V2 controller has some limitations
2755+
*/
2756+
#if ENABLED(DWIN_CREALITY_LCD)
2757+
#if DISABLED(SDSUPPORT)
2758+
#error "DWIN_CREALITY_LCD requires SDSUPPORT to be enabled."
2759+
#elif ENABLED(PID_EDIT_MENU)
2760+
#error "DWIN_CREALITY_LCD does not support PID_EDIT_MENU."
2761+
#elif ENABLED(PID_AUTOTUNE_MENU)
2762+
#error "DWIN_CREALITY_LCD does not support PID_AUTOTUNE_MENU."
2763+
#elif ENABLED(LEVEL_BED_CORNERS)
2764+
#error "DWIN_CREALITY_LCD does not support LEVEL_BED_CORNERS."
2765+
#elif BOTH(LCD_BED_LEVELING, PROBE_MANUALLY)
2766+
#error "DWIN_CREALITY_LCD does not support LCD_BED_LEVELING with PROBE_MANUALLY."
2767+
#endif
2768+
#endif
2769+
27532770
/**
27542771
* Some boards forbid the use of -1 Native USB
27552772
*/

Marlin/src/lcd/e3v2/creality/dwin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
#include "dwin.h"
3232

33-
#if ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT) && DISABLED(PROBE_MANUALLY)
33+
#if ENABLED(LCD_BED_LEVELING) && DISABLED(PROBE_MANUALLY) && ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT)
3434
#define HAS_ONESTEP_LEVELING 1
3535
#endif
3636

0 commit comments

Comments
 (0)