🔧 Sanity checks for Ender 3 V2

This commit is contained in:
Scott Lahteine 2021-09-05 20:32:29 -05:00
parent 253f91765d
commit 72d7bbbbf6
2 changed files with 22 additions and 5 deletions

View file

@ -1750,8 +1750,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
* LCD_BED_LEVELING requirements
*/
#if ENABLED(LCD_BED_LEVELING)
#if !HAS_LCD_MENU
#error "LCD_BED_LEVELING requires a programmable LCD controller."
#if NONE(HAS_LCD_MENU, DWIN_CREALITY_LCD)
#error "LCD_BED_LEVELING is not supported by the selected LCD controller."
#elif !(ENABLED(MESH_BED_LEVELING) || HAS_ABL_NOT_UBL)
#error "LCD_BED_LEVELING requires MESH_BED_LEVELING or AUTO_BED_LEVELING."
#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
+ (ENABLED(IS_LEGACY_TFT) && COUNT_ENABLED(TFT_320x240, TFT_320x240_SPI, TFT_480x320, TFT_480x320_SPI)) \
+ COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35) \
+ COUNT_ENABLED(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS) \
+ COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY, DWIN_CREALITY_LCD) \
+ COUNT_ENABLED(DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \
+ COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY) \
+ COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \
+ 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) \
+ COUNT_ENABLED(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004) \
+ 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
#error "Please select only one of CHIRON_TFT_STANDARD or CHIRON_TFT_NEW."
#endif
/**
* Ender 3 V2 controller has some limitations
*/
#if ENABLED(DWIN_CREALITY_LCD)
#if DISABLED(SDSUPPORT)
#error "DWIN_CREALITY_LCD requires SDSUPPORT to be enabled."
#elif ENABLED(PID_EDIT_MENU)
#error "DWIN_CREALITY_LCD does not support PID_EDIT_MENU."
#elif ENABLED(PID_AUTOTUNE_MENU)
#error "DWIN_CREALITY_LCD does not support PID_AUTOTUNE_MENU."
#elif ENABLED(LEVEL_BED_CORNERS)
#error "DWIN_CREALITY_LCD does not support LEVEL_BED_CORNERS."
#elif BOTH(LCD_BED_LEVELING, PROBE_MANUALLY)
#error "DWIN_CREALITY_LCD does not support LCD_BED_LEVELING with PROBE_MANUALLY."
#endif
#endif
/**
* Some boards forbid the use of -1 Native USB
*/

View file

@ -30,7 +30,7 @@
#include "dwin.h"
#if ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT) && DISABLED(PROBE_MANUALLY)
#if ENABLED(LCD_BED_LEVELING) && DISABLED(PROBE_MANUALLY) && ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT)
#define HAS_ONESTEP_LEVELING 1
#endif