Skip to content

Commit

Permalink
✨Add DGUS_LCD_UI_RELOADED (#21931)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrv96 authored and thinkyhead committed Oct 3, 2021
1 parent f434915 commit 9d73fcb
Show file tree
Hide file tree
Showing 31 changed files with 4,966 additions and 8 deletions.
5 changes: 5 additions & 0 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2565,10 +2565,15 @@
// - Download https://github.com/makerbase-mks/MKS-H43
// - Copy the downloaded DWIN_SET folder to the SD card.
//
// RELOADED (T5UID1)
// - Download https://github.com/Desuuuu/DGUS-reloaded
// - Copy the downloaded DWIN_SET folder to the SD card.
//
//#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
#if ENABLED(DGUS_LCD_UI_MKS)
#define USE_MKS_GREEN_UI
#endif
Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,10 @@

// Aliases for LCD features
#if ANY(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS)
#define HAS_DGUS_LCD_CLASSIC 1
#endif

#if ANY(HAS_DGUS_LCD_CLASSIC, DGUS_LCD_UI_RELOADED)
#define HAS_DGUS_LCD 1
#endif

Expand Down
31 changes: 30 additions & 1 deletion Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -2655,7 +2655,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) \
+ COUNT_ENABLED(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS, DGUS_LCD_UI_RELOADED) \
+ 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) \
Expand Down Expand Up @@ -3798,6 +3798,35 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
#endif
#undef _BAD_DRIVER

/**
* Require certain features for DGUS_LCD_UI_RELOADED.
*/
#if ENABLED(DGUS_LCD_UI_RELOADED)
#if BUFSIZE < 4
#error "DGUS_LCD_UI_RELOADED requires a BUFSIZE of at least 4."
#elif HOTENDS < 1
#error "DGUS_LCD_UI_RELOADED requires at least 1 hotend."
#elif EXTRUDERS < 1
#error "DGUS_LCD_UI_RELOADED requires at least 1 extruder."
#elif !HAS_HEATED_BED
#error "DGUS_LCD_UI_RELOADED requires a heated bed."
#elif FAN_COUNT < 1
#error "DGUS_LCD_UI_RELOADED requires a fan."
#elif !HAS_BED_PROBE
#error "DGUS_LCD_UI_RELOADED requires a bed probe."
#elif !HAS_MESH
#error "DGUS_LCD_UI_RELOADED requires mesh leveling."
#elif DISABLED(LEVEL_BED_CORNERS)
#error "DGUS_LCD_UI_RELOADED requires LEVEL_BED_CORNERS."
#elif DISABLED(BABYSTEP_ALWAYS_AVAILABLE)
#error "DGUS_LCD_UI_RELOADED requires BABYSTEP_ALWAYS_AVAILABLE."
#elif DISABLED(BABYSTEP_ZPROBE_OFFSET)
#error "DGUS_LCD_UI_RELOADED requires BABYSTEP_ZPROBE_OFFSET."
#elif ENABLED(AUTO_BED_LEVELING_UBL) && DISABLED(UBL_SAVE_ACTIVE_ON_M500)
#warning "Without UBL_SAVE_ACTIVE_ON_M500, your mesh will not be saved when using the touchscreen."
#endif
#endif

// Misc. Cleanup
#undef _TEST_PWM
#undef _LINEAR_AXES_STR
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "../../../inc/MarlinConfigPre.h"

#if HAS_DGUS_LCD
#if HAS_DGUS_LCD_CLASSIC

#if HOTENDS > 2
#warning "More than 2 hotends not implemented on DGUS Display UI."
Expand Down Expand Up @@ -268,4 +268,4 @@ bool populate_VPVar(const uint16_t VP, DGUS_VP_Variable * const ramcopy) {
return true;
}

#endif // HAS_DGUS_LCD
#endif // HAS_DGUS_LCD_CLASSIC
4 changes: 2 additions & 2 deletions Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "../../../inc/MarlinConfigPre.h"

#if HAS_DGUS_LCD
#if HAS_DGUS_LCD_CLASSIC

#include "DGUSScreenHandler.h"

Expand Down Expand Up @@ -772,4 +772,4 @@ void DGUSDisplay::RequestScreen(DGUSLCD_Screens screen) {
WriteVariable(0x84, gotoscreen, sizeof(gotoscreen));
}

#endif // HAS_DGUS_LCD
#endif // HAS_DGUS_LCD_CLASSIC
4 changes: 2 additions & 2 deletions Marlin/src/lcd/extui/dgus/dgus_extui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include "../../../inc/MarlinConfigPre.h"

#if HAS_DGUS_LCD
#if HAS_DGUS_LCD_CLASSIC

#include "../ui_api.h"
#include "DGUSDisplay.h"
Expand Down Expand Up @@ -159,4 +159,4 @@ namespace ExtUI {
void onSteppersEnabled() {}
}

#endif // HAS_DGUS_LCD
#endif // HAS_DGUS_LCD_CLASSIC
Loading

0 comments on commit 9d73fcb

Please sign in to comment.