Graphical TFT fixes, cleanup (#20861)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
@ -1155,36 +1155,37 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(TFT_COLOR_UI) && TFT_HEIGHT == 240
|
||||
#if ENABLED(TFT_INTERFACE_SPI)
|
||||
#define TFT_320x240_SPI
|
||||
#elif ENABLED(TFT_INTERFACE_FSMC)
|
||||
#define TFT_320x240
|
||||
#endif
|
||||
#elif ENABLED(TFT_COLOR_UI) && TFT_HEIGHT == 320
|
||||
#if ENABLED(TFT_INTERFACE_SPI)
|
||||
#define TFT_480x320_SPI
|
||||
#elif ENABLED(TFT_INTERFACE_FSMC)
|
||||
#define TFT_480x320
|
||||
#endif
|
||||
#elif ENABLED(TFT_COLOR_UI) && TFT_HEIGHT == 272
|
||||
#if ENABLED(TFT_INTERFACE_SPI)
|
||||
#define TFT_480x272_SPI
|
||||
#elif ENABLED(TFT_INTERFACE_FSMC)
|
||||
#define TFT_480x272
|
||||
#if ENABLED(TFT_COLOR_UI)
|
||||
#if TFT_HEIGHT == 240
|
||||
#if ENABLED(TFT_INTERFACE_SPI)
|
||||
#define TFT_320x240_SPI
|
||||
#elif ENABLED(TFT_INTERFACE_FSMC)
|
||||
#define TFT_320x240
|
||||
#endif
|
||||
#elif TFT_HEIGHT == 320
|
||||
#if ENABLED(TFT_INTERFACE_SPI)
|
||||
#define TFT_480x320_SPI
|
||||
#elif ENABLED(TFT_INTERFACE_FSMC)
|
||||
#define TFT_480x320
|
||||
#endif
|
||||
#elif TFT_HEIGHT == 272
|
||||
#if ENABLED(TFT_INTERFACE_SPI)
|
||||
#define TFT_480x272_SPI
|
||||
#elif ENABLED(TFT_INTERFACE_FSMC)
|
||||
#define TFT_480x272
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Fewer lines with touch buttons on-screen
|
||||
#if EITHER(TFT_320x240, TFT_320x240_SPI)
|
||||
#define HAS_UI_320x240 1
|
||||
#define LCD_HEIGHT TERN(TOUCH_SCREEN, 6, 7)
|
||||
#elif EITHER(TFT_480x320, TFT_480x320_SPI)
|
||||
#define HAS_UI_480x320 1
|
||||
#define LCD_HEIGHT TERN(TOUCH_SCREEN, 6, 7)
|
||||
#elif EITHER(TFT_480x272, TFT_480x272_SPI)
|
||||
#define HAS_UI_480x272 1
|
||||
#define LCD_HEIGHT TERN(TOUCH_SCREEN, 6, 7)
|
||||
#endif
|
||||
#if ANY(HAS_UI_320x240, HAS_UI_480x320, HAS_UI_480x272)
|
||||
#define LCD_HEIGHT TERN(TOUCH_SCREEN, 6, 7) // Fewer lines with touch buttons onscreen
|
||||
#endif
|
||||
|
||||
// This emulated DOGM has 'touch/xpt2046', not 'tft/xpt2046'
|
||||
|
@ -802,8 +802,6 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#if ENABLED(BABYSTEP_XY)
|
||||
static_assert(BABYSTEP_MULTIPLICATOR_XY <= 0.25f, "BABYSTEP_MULTIPLICATOR_XY must be less than or equal to 0.25mm.");
|
||||
#endif
|
||||
#elif ENABLED(BABYSTEP_DISPLAY_TOTAL) && ANY(TFT_320x240, TFT_320x240_SPI, TFT_480x320, TFT_480x320_SPI)
|
||||
#error "New Color UI (TFT_320x240, TFT_320x240_SPI, TFT_480x320, TFT_480x320_SPI) does not support BABYSTEP_DISPLAY_TOTAL yet."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user