Skip to content
This repository was archived by the owner on Nov 18, 2023. It is now read-only.

Commit 736d367

Browse files
committed
Add DGUS_RELOADED extui lib
1 parent 015c4e6 commit 736d367

29 files changed

+4847
-5
lines changed

Marlin/Configuration.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,6 +2068,11 @@
20682068
//#define DGUS_LCD_UI_FYSETC
20692069
//#define DGUS_LCD_UI_HIPRECY
20702070

2071+
//
2072+
// Alternative DGUS LCD firmware
2073+
//
2074+
//#define DGUS_LCD_UI_RELOADED
2075+
20712076
//
20722077
// Touch-screen LCD for Malyan M200 printers
20732078
//

Marlin/src/inc/Conditionals_LCD.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,10 @@
358358

359359
// Aliases for LCD features
360360
#if ANY(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
361+
#define DGUS_LCD_UI_CLASSIC
362+
#endif
363+
364+
#if ANY(DGUS_LCD_UI_CLASSIC, DGUS_LCD_UI_RELOADED)
361365
#define HAS_DGUS_LCD 1
362366
#endif
363367

Marlin/src/inc/SanityCheck.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,6 +2070,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
20702070
+ ENABLED(DGUS_LCD_UI_ORIGIN) \
20712071
+ ENABLED(DGUS_LCD_UI_FYSETC) \
20722072
+ ENABLED(DGUS_LCD_UI_HIPRECY) \
2073+
+ ENABLED(DGUS_LCD_UI_RELOADED) \
20732074
+ ENABLED(MALYAN_LCD) \
20742075
+ ENABLED(TOUCH_UI_FTDI_EVE) \
20752076
+ ENABLED(FSMC_GRAPHICAL_TFT)
@@ -2833,3 +2834,28 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
28332834
#if SAVED_POSITIONS > 256
28342835
#error "SAVED_POSITIONS must be an integer from 0 to 256."
28352836
#endif
2837+
2838+
/**
2839+
* Require certain features for DGUS_LCD_UI_RELOADED.
2840+
*/
2841+
#if ENABLED(DGUS_LCD_UI_RELOADED)
2842+
#if HOTENDS < 1
2843+
#error "DGUS_LCD_UI_RELOADED requires at least 1 hotend."
2844+
#elif EXTRUDERS < 1
2845+
#error "DGUS_LCD_UI_RELOADED requires at least 1 extruder."
2846+
#elif !HAS_HEATED_BED
2847+
#error "DGUS_LCD_UI_RELOADED requires a heated bed."
2848+
#elif FAN_COUNT < 1
2849+
#error "DGUS_LCD_UI_RELOADED requires a fan."
2850+
#elif !HAS_BED_PROBE
2851+
#error "DGUS_LCD_UI_RELOADED requires a bed probe."
2852+
#elif !HAS_MESH
2853+
#error "DGUS_LCD_UI_RELOADED requires mesh leveling."
2854+
#elif DISABLED(LEVEL_BED_CORNERS)
2855+
#error "DGUS_LCD_UI_RELOADED requires LEVEL_BED_CORNERS."
2856+
#elif DISABLED(BABYSTEP_ALWAYS_AVAILABLE)
2857+
#error "DGUS_LCD_UI_RELOADED requires BABYSTEP_ALWAYS_AVAILABLE."
2858+
#elif DISABLED(BABYSTEP_ZPROBE_OFFSET)
2859+
#error "DGUS_LCD_UI_RELOADED requires BABYSTEP_ZPROBE_OFFSET."
2860+
#endif
2861+
#endif

Marlin/src/lcd/extui/lib/dgus/DGUSDisplay.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

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

27-
#if HAS_DGUS_LCD
27+
#if ENABLED(DGUS_LCD_UI_CLASSIC)
2828

2929
#if HOTENDS > 2
3030
#error "More than 2 hotends not implemented on the Display UI design."
@@ -1352,4 +1352,4 @@ void DGUSDisplay::WritePGM(const char str[], uint8_t len) {
13521352
// A SW memory barrier, to ensure GCC does not overoptimize loops
13531353
#define sw_barrier() asm volatile("": : :"memory");
13541354

1355-
#endif // HAS_DGUS_LCD
1355+
#endif // DGUS_LCD_UI_CLASSIC

0 commit comments

Comments
 (0)