Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jan 1, 2023
1 parent cbf4a73 commit fca4cf2
Show file tree
Hide file tree
Showing 15 changed files with 2,745 additions and 3,050 deletions.
27 changes: 11 additions & 16 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2939,23 +2939,16 @@

/**
* DGUS Touch Display with DWIN OS. (Choose one.)
* ORIGIN : https://www.aliexpress.com/item/32993409517.html
* FYSETC : https://www.aliexpress.com/item/32961471929.html
* MKS : https://www.aliexpress.com/item/1005002008179262.html
*
* Flash display with DGUS Displays for Marlin:
* - Format the SD card to FAT32 with an allocation size of 4kb.
* - Download files as specified for your type of display.
* - Plug the microSD card into the back of the display.
* - Boot the display and wait for the update to complete.
*
* ORIGIN (Marlin DWIN_SET)
* - Download https://github.com/coldtobi/Marlin_DGUS_Resources
* - Copy the downloaded DWIN_SET folder to the SD card.
* - Product: https://www.aliexpress.com/item/32993409517.html
*
* FYSETC (Supplier default)
* - Download https://github.com/FYSETC/FYSTLCD-2.0
* - Copy the downloaded SCREEN folder to the SD card.
* - Product: https://www.aliexpress.com/item/32961471929.html
*
* HIPRECY (Supplier default)
* - Download https://github.com/HiPrecy/Touch-Lcd-LEO
Expand All @@ -2964,6 +2957,7 @@
* MKS (MKS-H43) (Supplier default)
* - Download https://github.com/makerbase-mks/MKS-H43
* - Copy the downloaded DWIN_SET folder to the SD card.
* - Product: https://www.aliexpress.com/item/1005002008179262.html
*
* RELOADED (T5UID1)
* - Download https://github.com/Desuuuu/DGUS-reloaded/releases
Expand All @@ -2972,14 +2966,15 @@
* IA_CREALITY (T5UID1)
* - Download https://github.com/InsanityAutomation/Marlin/raw/CrealityDwin2.0_Bleeding/TM3D_Combined480272_Landscape_V7.7z
* - Copy the downloaded DWIN_SET folder to the SD card.
*
* Flash display with DGUS Displays for Marlin:
* - Format the SD card to FAT32 with an allocation size of 4kb.
* - Download files as specified for your type of display.
* - Plug the microSD card into the back of the display.
* - Boot the display and wait for the update to complete.
*/
//#define DGUS_LCD_UI_ORIGIN
//#define DGUS_LCD_UI_FYSETC
//#define DGUS_LCD_UI_HIPRECY
//#define DGUS_LCD_UI_MKS
//#define DGUS_LCD_UI_RELOADED
//#define DGUS_LCD_UI_IA_CREALITY
#if ENABLED(DGUS_LCD_UI_MKS)
//#define DGUS_LCD_UI ORIGIN
#if DGUS_UI_IS(MKS)
#define USE_MKS_GREEN_UI
#endif

Expand Down
8 changes: 8 additions & 0 deletions Marlin/src/core/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -742,3 +742,11 @@
#define _HAS_E_TEMP(N) || TEMP_SENSOR(N)
#define HAS_E_TEMP_SENSOR (0 REPEAT(EXTRUDERS, _HAS_E_TEMP))
#define TEMP_SENSOR_IS_MAX_TC(T) (TEMP_SENSOR(T) == -5 || TEMP_SENSOR(T) == -3 || TEMP_SENSOR(T) == -2)

#define _UI_ORIGIN 0x01
#define _UI_FYSETC 0x02
#define _UI_HIPRECY 0x03
#define _UI_MKS 0x04
#define _UI_RELOADED 0x05
#define _UI_IA_CREALITY 0x06
#define DGUS_UI_IS(N) (DGUS_LCD_UI == _UI_ ## N)
15 changes: 15 additions & 0 deletions Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@
#define FYSETC_MINI_12864_2_1
#endif

// Updated DGUS_UI shorthand single option can be used, or old settings, for now
#if DGUS_UI_IS(ORIGIN)
#define DGUS_LCD_UI_ORIGIN
#elif DGUS_UI_IS(FYSETC)
#define DGUS_LCD_UI_FYSETC
#elif DGUS_UI_IS(HIPRECY)
#define DGUS_LCD_UI_HIPRECY
#elif DGUS_UI_IS(MKS)
#define DGUS_LCD_UI_MKS
#elif DGUS_UI_IS(RELOADED)
#define DGUS_LCD_UI_RELOADED
#elif DGUS_UI_IS(IA_CREALITY)
#define DGUS_LCD_UI_IA_CREALITY
#endif

/**
* General Flags that may be set below by specific LCDs
*
Expand Down
14 changes: 7 additions & 7 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -3009,7 +3009,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
+ (DISABLED(IS_LEGACY_TFT) && ENABLED(TFT_GENERIC)) \
+ (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, DGUS_LCD_UI_RELOADED) \
+ DGUS_LCD_IS(ORIGIN) + DGUS_LCD_IS(FYSETC) + DGUS_LCD_IS(HIPRECY) + DGUS_LCD_IS(MKS) + DGUS_LCD_IS(RELOADED) + DGUS_LCD_IS(IA_CREALITY) \
+ COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY) \
+ COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \
+ COUNT_ENABLED(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_GENERIC_12864_1_1) \
Expand Down Expand Up @@ -4303,15 +4303,15 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
*/
#if ENABLED(DGUS_LCD_UI_IA_CREALITY)
#if DISABLED(ADVANCED_PAUSE_FEATURE)
#error "DGUS_LCD_UI_IA_CREALITY requires ADVANCED_PAUSE_FEATURE."
#error "DGUS_LCD_UI IA_CREALITY requires ADVANCED_PAUSE_FEATURE."
#elif DISABLED(LCD_BED_TRAMMING)
#error "DGUS_LCD_UI_IA_CREALITY requires LCD_BED_TRAMMING."
#error "DGUS_LCD_UI IA_CREALITY requires LCD_BED_TRAMMING."
#elif DISABLED(CLASSIC_JERK)
#error "DGUS_LCD_UI_IA_CREALITY requires CLASSIC_JERK."
#error "DGUS_LCD_UI IA_CREALITY requires CLASSIC_JERK."
#elif DISABLED(BABYSTEPPING)
#error "DGUS_LCD_UI_IA_CREALITY requires BABYSTEPPING."
#elif NONE(AUTO_BED_LEVELING_BILINEAR,AUTO_BED_LEVELING_UBL,MESH_BED_LEVELING)
#error "DGUS_LCD_UI_IA_CREALITY requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL or MESH_BED_LEVELING)."
#error "DGUS_LCD_UI IA_CREALITY requires BABYSTEPPING."
#elif NONE(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL, MESH_BED_LEVELING)
#error "DGUS_LCD_UI IA_CREALITY requires AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL, or MESH_BED_LEVELING."
#endif
#endif

Expand Down
Loading

0 comments on commit fca4cf2

Please sign in to comment.