Skip to content

Commit

Permalink
💄 MarlinUI+DOGM leveled bed bitmaps (MarlinFirmware#23539)
Browse files Browse the repository at this point in the history
  • Loading branch information
The-EG authored and tomek2k1 committed Jan 13, 2023
1 parent b51c412 commit 3cb448c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
29 changes: 29 additions & 0 deletions Marlin/src/lcd/dogm/status/bed.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@
B00000011,B11111111,B11111111
};

#if HAS_LEVELING
const unsigned char status_bed_leveled_bmp[] PROGMEM = {
B11111111,B11111111,B11001110,
B01000000,B00100000,B00100100,
B00100000,B00010000,B00010000,
B00011111,B11111111,B11111000,
B00001000,B00000100,B00000100,
B00100100,B00000010,B00000010,
B01110011,B11111111,B11111111
};
#endif

const unsigned char status_bed_on_bmp[] PROGMEM = {
B00000010,B00100010,B00000000,
B00000100,B01000100,B00000000,
Expand All @@ -57,6 +69,23 @@
B00000011,B11111111,B11111111
};

#if HAS_LEVELING
const unsigned char status_bed_leveled_on_bmp[] PROGMEM = {
B00000010,B00100010,B00000000,
B00000100,B01000100,B00000000,
B00000100,B01000100,B00000000,
B00000010,B00100010,B00000000,
B00000001,B00010001,B00000000,
B11111111,B11111111,B11001110,
B01000000,B10101000,B10100100,
B00100001,B00010001,B00010000,
B00011111,B11111111,B11111000,
B00001000,B00000100,B00000100,
B00100100,B00000010,B00000010,
B01110011,B11111111,B11111111
};
#endif

#else

#define STATUS_BED_WIDTH 21
Expand Down
12 changes: 11 additions & 1 deletion Marlin/src/lcd/dogm/status_screen_DOGM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
#include "../../module/planner.h"
#endif

#if HAS_LEVELING
#include "../../module/planner.h"
#endif

#if HAS_CUTTER
#include "../../feature/spindle_laser.h"
#endif
Expand Down Expand Up @@ -602,7 +606,13 @@ void MarlinUI::draw_status_screen() {

#if DO_DRAW_BED && DISABLED(STATUS_COMBINE_HEATERS)
#if ANIM_BED
#define BED_BITMAP(S) ((S) ? status_bed_on_bmp : status_bed_bmp)
#if BOTH(HAS_LEVELING, STATUS_ALT_BED_BITMAP)
#define BED_BITMAP(S) ((S) \
? (planner.leveling_active ? status_bed_leveled_on_bmp : status_bed_on_bmp) \
: (planner.leveling_active ? status_bed_leveled_bmp : status_bed_bmp))
#else
#define BED_BITMAP(S) ((S) ? status_bed_on_bmp : status_bed_bmp)
#endif
#else
#define BED_BITMAP(S) status_bed_bmp
#endif
Expand Down

0 comments on commit 3cb448c

Please sign in to comment.