Selaa lähdekoodia

💄 MarlinUI+DOGM leveled bed bitmaps (#23539)

Taylor Talkington 2 vuotta sitten
vanhempi
commit
3315ff8856
No account linked to committer's email address
2 muutettua tiedostoa jossa 40 lisäystä ja 1 poistoa
  1. 29
    0
      Marlin/src/lcd/dogm/status/bed.h
  2. 11
    1
      Marlin/src/lcd/dogm/status_screen_DOGM.cpp

+ 29
- 0
Marlin/src/lcd/dogm/status/bed.h Näytä tiedosto

@@ -42,6 +42,18 @@
42 42
     B00000011,B11111111,B11111111
43 43
   };
44 44
 
45
+  #if HAS_LEVELING
46
+    const unsigned char status_bed_leveled_bmp[] PROGMEM = {
47
+      B11111111,B11111111,B11001110,
48
+      B01000000,B00100000,B00100100,
49
+      B00100000,B00010000,B00010000,
50
+      B00011111,B11111111,B11111000,
51
+      B00001000,B00000100,B00000100,
52
+      B00100100,B00000010,B00000010,
53
+      B01110011,B11111111,B11111111
54
+    };
55
+  #endif
56
+
45 57
   const unsigned char status_bed_on_bmp[] PROGMEM = {
46 58
     B00000010,B00100010,B00000000,
47 59
     B00000100,B01000100,B00000000,
@@ -57,6 +69,23 @@
57 69
     B00000011,B11111111,B11111111
58 70
   };
59 71
 
72
+  #if HAS_LEVELING
73
+    const unsigned char status_bed_leveled_on_bmp[] PROGMEM = {
74
+      B00000010,B00100010,B00000000,
75
+      B00000100,B01000100,B00000000,
76
+      B00000100,B01000100,B00000000,
77
+      B00000010,B00100010,B00000000,
78
+      B00000001,B00010001,B00000000,
79
+      B11111111,B11111111,B11001110,
80
+      B01000000,B10101000,B10100100,
81
+      B00100001,B00010001,B00010000,
82
+      B00011111,B11111111,B11111000,
83
+      B00001000,B00000100,B00000100,
84
+      B00100100,B00000010,B00000010,
85
+      B01110011,B11111111,B11111111
86
+    };
87
+  #endif
88
+
60 89
 #else
61 90
 
62 91
   #define STATUS_BED_WIDTH  21

+ 11
- 1
Marlin/src/lcd/dogm/status_screen_DOGM.cpp Näytä tiedosto

@@ -49,6 +49,10 @@
49 49
   #include "../../module/planner.h"
50 50
 #endif
51 51
 
52
+#if HAS_LEVELING
53
+  #include "../../module/planner.h"
54
+#endif
55
+
52 56
 #if HAS_CUTTER
53 57
   #include "../../feature/spindle_laser.h"
54 58
 #endif
@@ -602,7 +606,13 @@ void MarlinUI::draw_status_screen() {
602 606
 
603 607
   #if DO_DRAW_BED && DISABLED(STATUS_COMBINE_HEATERS)
604 608
     #if ANIM_BED
605
-      #define BED_BITMAP(S) ((S) ? status_bed_on_bmp : status_bed_bmp)
609
+      #if BOTH(HAS_LEVELING, STATUS_ALT_BED_BITMAP)
610
+        #define BED_BITMAP(S) ((S) \
611
+          ? (planner.leveling_active ? status_bed_leveled_on_bmp : status_bed_on_bmp) \
612
+          : (planner.leveling_active ? status_bed_leveled_bmp : status_bed_bmp))
613
+      #else
614
+        #define BED_BITMAP(S) ((S) ? status_bed_on_bmp : status_bed_bmp)
615
+      #endif
606 616
     #else
607 617
       #define BED_BITMAP(S) status_bed_bmp
608 618
     #endif

Loading…
Peruuta
Tallenna