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

Commit

Permalink
Add DGUS_RELOADED extui lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Desuuuu committed Jun 12, 2020
1 parent 015c4e6 commit 736d367
Show file tree
Hide file tree
Showing 29 changed files with 4,847 additions and 5 deletions.
5 changes: 5 additions & 0 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2068,6 +2068,11 @@
//#define DGUS_LCD_UI_FYSETC
//#define DGUS_LCD_UI_HIPRECY

//
// Alternative DGUS LCD firmware
//
//#define DGUS_LCD_UI_RELOADED

//
// Touch-screen LCD for Malyan M200 printers
//
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 @@ -358,6 +358,10 @@

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

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

Expand Down
26 changes: 26 additions & 0 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -2070,6 +2070,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
+ ENABLED(DGUS_LCD_UI_ORIGIN) \
+ ENABLED(DGUS_LCD_UI_FYSETC) \
+ ENABLED(DGUS_LCD_UI_HIPRECY) \
+ ENABLED(DGUS_LCD_UI_RELOADED) \
+ ENABLED(MALYAN_LCD) \
+ ENABLED(TOUCH_UI_FTDI_EVE) \
+ ENABLED(FSMC_GRAPHICAL_TFT)
Expand Down Expand Up @@ -2833,3 +2834,28 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
#if SAVED_POSITIONS > 256
#error "SAVED_POSITIONS must be an integer from 0 to 256."
#endif

/**
* Require certain features for DGUS_LCD_UI_RELOADED.
*/
#if ENABLED(DGUS_LCD_UI_RELOADED)
#if 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."
#endif
#endif
4 changes: 2 additions & 2 deletions Marlin/src/lcd/extui/lib/dgus/DGUSDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

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

#if HAS_DGUS_LCD
#if ENABLED(DGUS_LCD_UI_CLASSIC)

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

#endif // HAS_DGUS_LCD
#endif // DGUS_LCD_UI_CLASSIC
Loading

0 comments on commit 736d367

Please sign in to comment.