Browse Source

Make dogm status screen a CPP

Scott Lahteine 5 years ago
parent
commit
a964f098b3

+ 137
- 0
Marlin/src/lcd/dogm/dogm_Bootscreen.h View File

@@ -0,0 +1,137 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Standard Marlin Boot Screen bitmaps
25
+ *
26
+ * Use the Marlin Bitmap Converter to make your own:
27
+ * http://marlinfw.org/tools/u8glib/converter.html
28
+ */
29
+
30
+#include <binary.h>
31
+
32
+#include "../../inc/MarlinConfig.h"
33
+
34
+#if ENABLED(SHOW_BOOTSCREEN)
35
+
36
+  //#define START_BMPHIGH // Costs 399 bytes more flash
37
+
38
+  #if ENABLED(SHOW_CUSTOM_BOOTSCREEN)
39
+
40
+    #include "../../../_Bootscreen.h"
41
+
42
+    #ifndef CUSTOM_BOOTSCREEN_TIMEOUT
43
+      #define CUSTOM_BOOTSCREEN_TIMEOUT 2500
44
+    #endif
45
+
46
+  #endif
47
+
48
+  #if ENABLED(START_BMPHIGH)
49
+
50
+    #define START_BMPWIDTH      112
51
+
52
+    const unsigned char start_bmp[] PROGMEM = {
53
+      B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
54
+      B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
55
+      B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111,
56
+      B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,
57
+      B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111,
58
+      B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,
59
+      B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111,
60
+      B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00111111,B11111111,
61
+      B11000000,B00001111,B11000000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00011000,B00000000,B00011111,B11111111,
62
+      B11000000,B00111111,B11100001,B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00001111,B11111111,
63
+      B11000000,B01111111,B11110011,B11111111,B10000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00000111,B11111111,
64
+      B11000000,B11111111,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00000011,B11111111,
65
+      B11000001,B11111000,B01111111,B10000111,B11100000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000001,B11111111,
66
+      B11000001,B11110000,B00111111,B00000011,B11100000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,B11111111,
67
+      B11000001,B11100000,B00011110,B00000001,B11100000,B00011111,B00000000,B00000011,B11100000,B01111000,B00111100,B00000011,B11110000,B01111111,
68
+      B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B11000000,B00001111,B11111000,B01111000,B00111100,B00000111,B11111100,B00111111,
69
+      B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B11100000,B00011111,B11111100,B01111000,B00111100,B00001111,B11111110,B00011111,
70
+      B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B11110000,B00111111,B11111110,B01111000,B00111100,B00011111,B11111110,B00001111,
71
+      B11000001,B11100000,B00011110,B00000001,B11100011,B11110011,B11111000,B00111111,B00111110,B01111000,B00111100,B00111111,B00111111,B00000111,
72
+      B11000001,B11100000,B00011110,B00000001,B11100111,B11100000,B11111100,B01111100,B00011111,B01111000,B00111100,B00111110,B00011111,B00000111,
73
+      B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B01111100,B01111100,B00001111,B01111000,B00111100,B00111100,B00001111,B00000011,
74
+      B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B01111100,B01111000,B00001111,B01111000,B00111100,B00111100,B00001111,B00000011,
75
+      B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00111100,B00001111,B00000011,
76
+      B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00111100,B00001111,B00000011,
77
+      B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00111100,B00001111,B00000011,
78
+      B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00111100,B00001111,B00000011,
79
+      B11000001,B11100000,B00011110,B00000001,B11100011,B11100000,B00111100,B01111000,B00000000,B01111100,B00111100,B00111100,B00001111,B00000011,
80
+      B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B00111111,B11111000,B00000000,B01111111,B10111100,B00111100,B00001111,B00000011,
81
+      B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B00111111,B11111000,B00000000,B00111111,B10111111,B11111100,B00001111,B00000011,
82
+      B11000001,B11100000,B00011110,B00000001,B11100000,B11111111,B00111111,B11111000,B00000000,B00011111,B10111111,B11111100,B00001111,B00000011,
83
+      B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B00111111,B11111000,B00000000,B00001111,B10111111,B11111100,B00001111,B00000011,
84
+      B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
85
+      B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
86
+      B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001110,
87
+      B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011100,
88
+      B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,
89
+      B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,
90
+      B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000
91
+    };
92
+
93
+  #else
94
+
95
+    #define START_BMPWIDTH      56
96
+
97
+    const unsigned char start_bmp[] PROGMEM = {
98
+      B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
99
+      B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
100
+      B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
101
+      B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
102
+      B10000011,B11001111,B00000000,B00000000,B00001100,B00110000,B00111111,
103
+      B10000111,B11111111,B10000000,B00000000,B00001100,B00110000,B00011111,
104
+      B10000110,B01111001,B10000000,B00000000,B00001100,B00000000,B00001111,
105
+      B10001100,B00110000,B11000111,B10000011,B10001100,B00110000,B11100111,
106
+      B10001100,B00110000,B11001111,B11000111,B11001100,B00110001,B11110011,
107
+      B10001100,B00110000,B11011100,B11101100,B11101100,B00110011,B10111001,
108
+      B10001100,B00110000,B11011000,B01101100,B01101100,B00110011,B00011001,
109
+      B10001100,B00110000,B11010000,B01101100,B00001100,B00110011,B00011001,
110
+      B10001100,B00110000,B11011000,B01101100,B00001100,B00110011,B00011001,
111
+      B10001100,B00110000,B11011100,B01101100,B00001110,B00111011,B00011001,
112
+      B10001100,B00110000,B11001111,B01111100,B00000111,B10011111,B00011001,
113
+      B10001100,B00110000,B11000111,B01111100,B00000011,B10001111,B00011001,
114
+      B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,
115
+      B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
116
+      B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000
117
+    };
118
+
119
+  #endif
120
+
121
+  #ifndef START_BMP_BYTEWIDTH
122
+    #define START_BMP_BYTEWIDTH ((START_BMPWIDTH + 7) / 8)
123
+  #endif
124
+  #ifndef START_BMPHEIGHT
125
+    #define START_BMPHEIGHT (sizeof(start_bmp) / (START_BMP_BYTEWIDTH))
126
+  #endif
127
+
128
+  static_assert(sizeof(start_bmp) == (START_BMP_BYTEWIDTH) * (START_BMPHEIGHT), "Bootscreen (start_bmp) dimensions don't match data.");
129
+
130
+#endif
131
+
132
+#ifndef CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH
133
+  #define CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH ((CUSTOM_BOOTSCREEN_BMPWIDTH + 7) / 8)
134
+#endif
135
+#ifndef CUSTOM_BOOTSCREEN_BMPHEIGHT
136
+  #define CUSTOM_BOOTSCREEN_BMPHEIGHT (sizeof(custom_start_bmp) / (CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH))
137
+#endif

Marlin/src/lcd/dogm/dogm_bitmaps.h → Marlin/src/lcd/dogm/dogm_Statusscreen.h View File

@@ -21,7 +21,7 @@
21 21
  */
22 22
 
23 23
 /**
24
- * Standard Marlin Boot and Status Screen bitmaps
24
+ * Standard Marlin Status Screen bitmaps
25 25
  *
26 26
  * Use the Marlin Bitmap Converter to make your own:
27 27
  * http://marlinfw.org/tools/u8glib/converter.html
@@ -31,109 +31,18 @@
31 31
 
32 32
 #include "../../inc/MarlinConfig.h"
33 33
 
34
-#if ENABLED(SHOW_BOOTSCREEN)
35
-
36
-  //#define START_BMPHIGH // Costs 399 bytes more flash
37
-
38
-  #if ENABLED(SHOW_CUSTOM_BOOTSCREEN)
39
-
40
-    #include "../../../_Bootscreen.h"
41
-
42
-    #ifndef CUSTOM_BOOTSCREEN_TIMEOUT
43
-      #define CUSTOM_BOOTSCREEN_TIMEOUT 2500
44
-    #endif
45
-
46
-  #endif
47
-
48
-  #if ENABLED(START_BMPHIGH)
49
-
50
-    #define START_BMPWIDTH      112
51
-
52
-    const unsigned char start_bmp[] PROGMEM = {
53
-      B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
54
-      B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
55
-      B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111,
56
-      B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,
57
-      B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111,
58
-      B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,
59
-      B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111,
60
-      B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00111111,B11111111,
61
-      B11000000,B00001111,B11000000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00011000,B00000000,B00011111,B11111111,
62
-      B11000000,B00111111,B11100001,B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00001111,B11111111,
63
-      B11000000,B01111111,B11110011,B11111111,B10000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00000111,B11111111,
64
-      B11000000,B11111111,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00000011,B11111111,
65
-      B11000001,B11111000,B01111111,B10000111,B11100000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000001,B11111111,
66
-      B11000001,B11110000,B00111111,B00000011,B11100000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,B11111111,
67
-      B11000001,B11100000,B00011110,B00000001,B11100000,B00011111,B00000000,B00000011,B11100000,B01111000,B00111100,B00000011,B11110000,B01111111,
68
-      B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B11000000,B00001111,B11111000,B01111000,B00111100,B00000111,B11111100,B00111111,
69
-      B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B11100000,B00011111,B11111100,B01111000,B00111100,B00001111,B11111110,B00011111,
70
-      B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B11110000,B00111111,B11111110,B01111000,B00111100,B00011111,B11111110,B00001111,
71
-      B11000001,B11100000,B00011110,B00000001,B11100011,B11110011,B11111000,B00111111,B00111110,B01111000,B00111100,B00111111,B00111111,B00000111,
72
-      B11000001,B11100000,B00011110,B00000001,B11100111,B11100000,B11111100,B01111100,B00011111,B01111000,B00111100,B00111110,B00011111,B00000111,
73
-      B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B01111100,B01111100,B00001111,B01111000,B00111100,B00111100,B00001111,B00000011,
74
-      B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B01111100,B01111000,B00001111,B01111000,B00111100,B00111100,B00001111,B00000011,
75
-      B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00111100,B00001111,B00000011,
76
-      B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00111100,B00001111,B00000011,
77
-      B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00111100,B00001111,B00000011,
78
-      B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00111100,B00001111,B00000011,
79
-      B11000001,B11100000,B00011110,B00000001,B11100011,B11100000,B00111100,B01111000,B00000000,B01111100,B00111100,B00111100,B00001111,B00000011,
80
-      B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B00111111,B11111000,B00000000,B01111111,B10111100,B00111100,B00001111,B00000011,
81
-      B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B00111111,B11111000,B00000000,B00111111,B10111111,B11111100,B00001111,B00000011,
82
-      B11000001,B11100000,B00011110,B00000001,B11100000,B11111111,B00111111,B11111000,B00000000,B00011111,B10111111,B11111100,B00001111,B00000011,
83
-      B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B00111111,B11111000,B00000000,B00001111,B10111111,B11111100,B00001111,B00000011,
84
-      B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
85
-      B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
86
-      B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001110,
87
-      B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011100,
88
-      B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,
89
-      B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,
90
-      B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000
91
-    };
92
-
93
-  #else
94
-
95
-    #define START_BMPWIDTH      56
96
-
97
-    const unsigned char start_bmp[] PROGMEM = {
98
-      B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
99
-      B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
100
-      B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
101
-      B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
102
-      B10000011,B11001111,B00000000,B00000000,B00001100,B00110000,B00111111,
103
-      B10000111,B11111111,B10000000,B00000000,B00001100,B00110000,B00011111,
104
-      B10000110,B01111001,B10000000,B00000000,B00001100,B00000000,B00001111,
105
-      B10001100,B00110000,B11000111,B10000011,B10001100,B00110000,B11100111,
106
-      B10001100,B00110000,B11001111,B11000111,B11001100,B00110001,B11110011,
107
-      B10001100,B00110000,B11011100,B11101100,B11101100,B00110011,B10111001,
108
-      B10001100,B00110000,B11011000,B01101100,B01101100,B00110011,B00011001,
109
-      B10001100,B00110000,B11010000,B01101100,B00001100,B00110011,B00011001,
110
-      B10001100,B00110000,B11011000,B01101100,B00001100,B00110011,B00011001,
111
-      B10001100,B00110000,B11011100,B01101100,B00001110,B00111011,B00011001,
112
-      B10001100,B00110000,B11001111,B01111100,B00000111,B10011111,B00011001,
113
-      B10001100,B00110000,B11000111,B01111100,B00000011,B10001111,B00011001,
114
-      B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,
115
-      B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
116
-      B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000
117
-    };
118
-
119
-  #endif
120
-
121
-  #ifndef START_BMP_BYTEWIDTH
122
-    #define START_BMP_BYTEWIDTH ((START_BMPWIDTH + 7) / 8)
123
-  #endif
124
-  #ifndef START_BMPHEIGHT
125
-    #define START_BMPHEIGHT (sizeof(start_bmp) / (START_BMP_BYTEWIDTH))
126
-  #endif
127
-
128
-  static_assert(sizeof(start_bmp) == (START_BMP_BYTEWIDTH) * (START_BMPHEIGHT), "Bootscreen (start_bmp) dimensions don't match data.");
129
-
130
-#endif
131
-
132 34
 #if ENABLED(CUSTOM_STATUS_SCREEN_IMAGE)
133 35
 
134
-  // This file must define STATUS_SCREENWIDTH and status_screen[012]_bmp.
135
-  // It can also define STATUS_SCREEN_X, STATUS_SCREEN_{BED,FAN}_TEXT_X and
136
-  // STATUS_SCREEN_HOTEND_TEXT_X(i) to modify draw locations.
36
+  /**
37
+   * Custom _Statusscreen.h files must define STATUS_SCREENWIDTH and status_screen[012]_bmp.
38
+   * There's no need to define STATUS_SCREENHEIGHT since it's calculated automatically.
39
+   * You can also define these to modify drawing and animation:
40
+   *
41
+   *  - STATUS_SCREEN_X
42
+   *  - STATUS_SCREEN_{BED,FAN}_TEXT_X
43
+   *  - STATUS_SCREEN_HOTEND_TEXT_X(i)
44
+   *  - FAN_ANIM_FRAMES
45
+   */
137 46
   #include "../../../_Statusscreen.h"
138 47
 
139 48
 #else // !CUSTOM_STATUS_SCREEN_IMAGE
@@ -1161,106 +1070,6 @@
1161 1070
 
1162 1071
 #endif // !CUSTOM_STATUS_SCREEN_IMAGE
1163 1072
 
1164
-#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(MESH_EDIT_GFX_OVERLAY)
1165
-
1166
-  const unsigned char cw_bmp[] PROGMEM = {
1167
-    B00000011,B11111000,B00000000,
1168
-    B00001111,B11111110,B00000000,
1169
-    B00011110,B00001111,B00000000,
1170
-    B00111000,B00000111,B00000000,
1171
-    B00111000,B00000011,B10000000,
1172
-    B01110000,B00000011,B10000000,
1173
-    B01110000,B00001111,B11100000,
1174
-    B01110000,B00000111,B11000000,
1175
-    B01110000,B00000011,B10000000,
1176
-    B01110000,B00000001,B00000000,
1177
-    B01110000,B00000000,B00000000,
1178
-    B00111000,B00000000,B00000000,
1179
-    B00111000,B00000111,B00000000,
1180
-    B00011110,B00001111,B00000000,
1181
-    B00001111,B11111110,B00000000,
1182
-    B00000011,B11111000,B00000000
1183
-  };
1184
-
1185
-  const unsigned char ccw_bmp[] PROGMEM = {
1186
-    B00000000,B11111110,B00000000,
1187
-    B00000011,B11111111,B10000000,
1188
-    B00000111,B10000011,B11000000,
1189
-    B00001110,B00000001,B11000000,
1190
-    B00001110,B00000000,B11100000,
1191
-    B00011100,B00000000,B11100000,
1192
-    B01111111,B00000000,B11100000,
1193
-    B00111110,B00000000,B11100000,
1194
-    B00011100,B00000000,B11100000,
1195
-    B00001000,B00000000,B11100000,
1196
-    B00000000,B00000000,B11100000,
1197
-    B00000000,B00000001,B11000000,
1198
-    B00001110,B00000001,B11000000,
1199
-    B00001111,B00000111,B10000000,
1200
-    B00000111,B11111111,B00000000,
1201
-    B00000001,B11111100,B00000000
1202
-  };
1203
-
1204
-  const unsigned char up_arrow_bmp[] PROGMEM = {
1205
-    B00000100,B00000000,
1206
-    B00001110,B00000000,
1207
-    B00011111,B00000000,
1208
-    B00111111,B10000000,
1209
-    B01111111,B11000000,
1210
-    B00001110,B00000000,
1211
-    B00001110,B00000000,
1212
-    B00001110,B00000000,
1213
-    B00001110,B00000000,
1214
-    B00001110,B00000000,
1215
-    B00001110,B00000000,
1216
-    B00001110,B00000000,
1217
-    B00001110,B00000000
1218
-  };
1219
-
1220
-  const unsigned char down_arrow_bmp[] PROGMEM = {
1221
-    B00001110,B00000000,
1222
-    B00001110,B00000000,
1223
-    B00001110,B00000000,
1224
-    B00001110,B00000000,
1225
-    B00001110,B00000000,
1226
-    B00001110,B00000000,
1227
-    B00001110,B00000000,
1228
-    B00001110,B00000000,
1229
-    B01111111,B11000000,
1230
-    B00111111,B10000000,
1231
-    B00011111,B00000000,
1232
-    B00001110,B00000000,
1233
-    B00000100,B00000000
1234
-  };
1235
-
1236
-  const unsigned char offset_bedline_bmp[] PROGMEM = {
1237
-    B11111111,B11111111,B11111111
1238
-  };
1239
-
1240
-  const unsigned char nozzle_bmp[] PROGMEM = {
1241
-    B01111111,B10000000,
1242
-    B11111111,B11000000,
1243
-    B11111111,B11000000,
1244
-    B11111111,B11000000,
1245
-    B01111111,B10000000,
1246
-    B01111111,B10000000,
1247
-    B11111111,B11000000,
1248
-    B11111111,B11000000,
1249
-    B11111111,B11000000,
1250
-    B00111111,B00000000,
1251
-    B00011110,B00000000,
1252
-    B00001100,B00000000
1253
-  };
1254
-
1255
-#endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY
1256
-
1257
-#ifndef CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH
1258
-  #define CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH ((CUSTOM_BOOTSCREEN_BMPWIDTH + 7) / 8)
1259
-#endif
1260
-#ifndef CUSTOM_BOOTSCREEN_BMPHEIGHT
1261
-  #define CUSTOM_BOOTSCREEN_BMPHEIGHT (sizeof(custom_start_bmp) / (CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH))
1262
-#endif
1263
-
1264 1073
 #ifndef FAN_ANIM_FRAMES
1265 1074
   #define FAN_ANIM_FRAMES 2
1266 1075
 #elif FAN_ANIM_FRAMES > 3

Marlin/src/lcd/dogm/status_screen_DOGM.h → Marlin/src/lcd/dogm/status_screen_DOGM.cpp View File

@@ -20,16 +20,28 @@
20 20
  *
21 21
  */
22 22
 
23
-/**
24
- * status_screen_DOGM.h
25
- *
26
- * Standard Status Screen for Graphical Display
27
- */
23
+//
24
+// status_screen_DOGM.cpp
25
+// Standard Status Screen for Graphical Display
26
+//
27
+
28
+#include "../../inc/MarlinConfigPre.h"
28 29
 
29
-#ifndef _STATUS_SCREEN_DOGM_H_
30
-#define _STATUS_SCREEN_DOGM_H_
30
+#if HAS_GRAPHICAL_LCD && DISABLED(LIGHTWEIGHT_UI)
31 31
 
32
+#include "dogm_Statusscreen.h"
33
+#include "../ultralcd.h"
34
+#include "../lcdprint.h"
32 35
 #include "../../module/motion.h"
36
+#include "../../module/temperature.h"
37
+
38
+#if ENABLED(SDSUPPORT)
39
+  #include "../../sd/cardreader.h"
40
+#endif
41
+
42
+#if HAS_PRINT_PROGRESS
43
+  #include "../../module/printcounter.h"
44
+#endif
33 45
 
34 46
 FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t x, const uint8_t y) {
35 47
   const char * const str = itostr3(temp);
@@ -123,7 +135,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
123 135
   }
124 136
 }
125 137
 
126
-inline void lcd_implementation_status_message(const bool blink) {
138
+FORCE_INLINE void lcd_implementation_status_message(const bool blink) {
127 139
   #if ENABLED(STATUS_MESSAGE_SCROLLING)
128 140
     static bool last_blink = false;
129 141
 
@@ -200,42 +212,43 @@ inline void lcd_implementation_status_message(const bool blink) {
200 212
   #endif
201 213
 }
202 214
 
215
+// The current graphical page being rendered
216
+u8g_page_t &page = ((u8g_pb_t *)((u8g.getU8g())->dev->dev_mem))->p;
217
+
203 218
 void lcd_impl_status_screen_0() {
204 219
 
205 220
   const bool blink = lcd_blink();
206 221
 
207
-  #if FAN_ANIM_FRAMES > 2
208
-    static bool old_blink;
209
-    static uint8_t fan_frame;
210
-    if (old_blink != blink) {
211
-      old_blink = blink;
212
-      if (!fan_speed[0] || ++fan_frame >= FAN_ANIM_FRAMES) fan_frame = 0;
213
-    }
214
-  #endif
215
-
216 222
   // Status Menu Font
217 223
   lcd_setFont(FONT_STATUSMENU);
218 224
 
219 225
   //
220 226
   // Fan Animation
221 227
   //
222
-  // Draws the whole heading image as a B/W bitmap rather than
223
-  // drawing the elements separately.
224
-  // This was done as an optimization, as it was slower to draw
225
-  // multiple parts compared to a single bitmap.
228
+  // Draw the entire heading image bitmap rather than each element
229
+  // separately. This is an optimization because it's slower to draw
230
+  // multiple elements than a single bitmap.
226 231
   //
227 232
   // The bitmap:
228
-  // - May be offset in X
229
-  // - Includes all nozzle(s), bed(s), and the fan.
233
+  //  - May be offset in X
234
+  //  - Includes all nozzle(s), bed(s), and the fan.
230 235
   //
231 236
   // TODO:
232 237
   //
233
-  // - Only draw the whole header on the first
234
-  //   entry to the status screen. Nozzle, bed, and
235
-  //   fan outline bits don't change.
238
+  //  - Only draw the whole header on the first
239
+  //    entry to the status screen. Nozzle, bed, and
240
+  //    fan outline bits don't change.
236 241
   //
237
-  if (PAGE_UNDER(STATUS_SCREENHEIGHT + 1)) {
242
+  #if FAN_ANIM_FRAMES > 2
243
+    static bool old_blink;
244
+    static uint8_t fan_frame;
245
+    if (old_blink != blink) {
246
+      old_blink = blink;
247
+      if (!fan_speed[0] || ++fan_frame >= FAN_ANIM_FRAMES) fan_frame = 0;
248
+    }
249
+  #endif
238 250
 
251
+  if (PAGE_UNDER(STATUS_SCREENHEIGHT + 1))
239 252
     u8g.drawBitmapP(
240 253
       STATUS_SCREEN_X, STATUS_SCREEN_Y,
241 254
       (STATUS_SCREENWIDTH + 7) / 8, STATUS_SCREENHEIGHT,
@@ -253,8 +266,6 @@ void lcd_impl_status_screen_0() {
253 266
       status_screen0_bmp
254 267
     );
255 268
 
256
-  }
257
-
258 269
   //
259 270
   // Temperature Graphics and Info
260 271
   //
@@ -359,7 +370,7 @@ void lcd_impl_status_screen_0() {
359 370
       lcd_put_u8str(buffer);
360 371
     }
361 372
 
362
-  #endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY
373
+  #endif // HAS_PRINT_PROGRESS
363 374
 
364 375
   //
365 376
   // XYZ Coordinates
@@ -494,4 +505,4 @@ void lcd_impl_status_screen_0() {
494 505
   }
495 506
 }
496 507
 
497
-#endif // _STATUS_SCREEN_DOGM_H_
508
+#endif // HAS_GRAPHICAL_LCD && !LIGHTWEIGHT_UI

+ 98
- 51
Marlin/src/lcd/dogm/ultralcd_impl_DOGM.cpp View File

@@ -37,16 +37,16 @@
37 37
 
38 38
 #include "../../inc/MarlinConfigPre.h"
39 39
 
40
-#if ENABLED(DOGLCD)
40
+#if HAS_GRAPHICAL_LCD
41 41
 
42 42
 #include "../ultralcd.h"
43 43
 
44 44
 #include <U8glib.h>
45 45
 #include "HAL_LCD_class_defines.h"
46
-
47
-#include "../fontutils.h"
48 46
 #include "u8g_fontutf8.h"
49
-#include "dogm_bitmaps.h"
47
+#include "../lcdprint.h"
48
+#include "../fontutils.h"
49
+#include "dogm_Bootscreen.h"
50 50
 
51 51
 #include "../../sd/cardreader.h"
52 52
 #include "../../module/temperature.h"
@@ -60,55 +60,22 @@
60 60
   #include "../../feature/bedlevel/ubl/ubl.h"
61 61
 #endif
62 62
 
63
-// The Marlin special symbols is now in the fontdata_ISO10646_1.h
64 63
 #define FONT_SPECIAL_NAME ISO10646_1_5x7
65
-
66
-// Only Western languages support big / small fonts
67
-#if DISABLED(DISPLAY_CHARSET_ISO10646_1)
68
-  #undef USE_BIG_EDIT_FONT
69
-  #undef USE_SMALL_INFOFONT
70
-#endif
71
-
64
+#define FONT_MENU_NAME ISO10646_1_5x7
65
+#include "fontdata/fontdata_ISO10646_1.h"
72 66
 #if ENABLED(USE_SMALL_INFOFONT)
73 67
   #include "fontdata/fontdata_6x9_marlin.h"
74 68
   #define FONT_STATUSMENU_NAME u8g_font_6x9
75
-  #define INFO_FONT_HEIGHT 7
76 69
 #else
77 70
   #define FONT_STATUSMENU_NAME FONT_MENU_NAME
78
-  #define INFO_FONT_HEIGHT 8
79
-#endif
80
-
81
-#include LANGUAGE_DATA_INCL(LCD_LANGUAGE)
82
-
83
-#include "fontdata/fontdata_ISO10646_1.h"
84
-#define FONT_MENU_NAME ISO10646_1_5x7
85
-
86
-// DOGM parameters (size in pixels)
87
-#define DOG_CHAR_WIDTH         6
88
-#define DOG_CHAR_HEIGHT        12
89
-#if ENABLED(USE_BIG_EDIT_FONT)
90
-  #define FONT_MENU_EDIT_NAME u8g_font_9x18
91
-  #define DOG_CHAR_WIDTH_EDIT  9
92
-  #define DOG_CHAR_HEIGHT_EDIT 18
93
-#else
94
-  #define FONT_MENU_EDIT_NAME FONT_MENU_NAME
95
-  #define DOG_CHAR_WIDTH_EDIT  DOG_CHAR_WIDTH
96
-  #define DOG_CHAR_HEIGHT_EDIT DOG_CHAR_HEIGHT
97 71
 #endif
98 72
 
99
-#define START_COL              0
73
+#define START_COL 0
100 74
 
101 75
 U8G_CLASS u8g(U8G_PARAM);
102 76
 U8GLIB *pu8g = &u8g;
103 77
 
104
-#ifndef LCD_PIXEL_WIDTH
105
-  #define LCD_PIXEL_WIDTH 128
106
-#endif
107
-#ifndef LCD_PIXEL_HEIGHT
108
-  #define LCD_PIXEL_HEIGHT 64
109
-#endif
110
-
111
-#include "../lcdprint.h"
78
+#include LANGUAGE_DATA_INCL(LCD_LANGUAGE)
112 79
 
113 80
 #if HAS_LCD_CONTRAST
114 81
 
@@ -121,13 +88,6 @@ U8GLIB *pu8g = &u8g;
121 88
 
122 89
 #endif
123 90
 
124
-// The current graphical page being rendered
125
-u8g_page_t &page = ((u8g_pb_t *)((u8g.getU8g())->dev->dev_mem))->p;
126
-
127
-// For selective rendering within a Y range
128
-#define PAGE_UNDER(yb) (u8g.getU8g()->current_page.y0 <= (yb))
129
-#define PAGE_CONTAINS(ya, yb) (PAGE_UNDER(yb) && u8g.getU8g()->current_page.y1 >= (ya))
130
-
131 91
 void lcd_setFont(const MarlinFont font_nr) {
132 92
   static char currentfont = 0;
133 93
   if (font_nr != currentfont) {
@@ -223,8 +183,6 @@ void lcd_setFont(const MarlinFont font_nr) {
223 183
 
224 184
 #if ENABLED(LIGHTWEIGHT_UI)
225 185
   #include "status_screen_lite_ST7920.h"
226
-#else
227
-  #include "status_screen_DOGM.h"
228 186
 #endif
229 187
 
230 188
 // Initialize or re-initialize the LCD
@@ -572,6 +530,95 @@ void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
572 530
 
573 531
   #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(MESH_EDIT_GFX_OVERLAY)
574 532
 
533
+    const unsigned char cw_bmp[] PROGMEM = {
534
+      B00000011,B11111000,B00000000,
535
+      B00001111,B11111110,B00000000,
536
+      B00011110,B00001111,B00000000,
537
+      B00111000,B00000111,B00000000,
538
+      B00111000,B00000011,B10000000,
539
+      B01110000,B00000011,B10000000,
540
+      B01110000,B00001111,B11100000,
541
+      B01110000,B00000111,B11000000,
542
+      B01110000,B00000011,B10000000,
543
+      B01110000,B00000001,B00000000,
544
+      B01110000,B00000000,B00000000,
545
+      B00111000,B00000000,B00000000,
546
+      B00111000,B00000111,B00000000,
547
+      B00011110,B00001111,B00000000,
548
+      B00001111,B11111110,B00000000,
549
+      B00000011,B11111000,B00000000
550
+    };
551
+
552
+    const unsigned char ccw_bmp[] PROGMEM = {
553
+      B00000000,B11111110,B00000000,
554
+      B00000011,B11111111,B10000000,
555
+      B00000111,B10000011,B11000000,
556
+      B00001110,B00000001,B11000000,
557
+      B00001110,B00000000,B11100000,
558
+      B00011100,B00000000,B11100000,
559
+      B01111111,B00000000,B11100000,
560
+      B00111110,B00000000,B11100000,
561
+      B00011100,B00000000,B11100000,
562
+      B00001000,B00000000,B11100000,
563
+      B00000000,B00000000,B11100000,
564
+      B00000000,B00000001,B11000000,
565
+      B00001110,B00000001,B11000000,
566
+      B00001111,B00000111,B10000000,
567
+      B00000111,B11111111,B00000000,
568
+      B00000001,B11111100,B00000000
569
+    };
570
+
571
+    const unsigned char up_arrow_bmp[] PROGMEM = {
572
+      B00000100,B00000000,
573
+      B00001110,B00000000,
574
+      B00011111,B00000000,
575
+      B00111111,B10000000,
576
+      B01111111,B11000000,
577
+      B00001110,B00000000,
578
+      B00001110,B00000000,
579
+      B00001110,B00000000,
580
+      B00001110,B00000000,
581
+      B00001110,B00000000,
582
+      B00001110,B00000000,
583
+      B00001110,B00000000,
584
+      B00001110,B00000000
585
+    };
586
+
587
+    const unsigned char down_arrow_bmp[] PROGMEM = {
588
+      B00001110,B00000000,
589
+      B00001110,B00000000,
590
+      B00001110,B00000000,
591
+      B00001110,B00000000,
592
+      B00001110,B00000000,
593
+      B00001110,B00000000,
594
+      B00001110,B00000000,
595
+      B00001110,B00000000,
596
+      B01111111,B11000000,
597
+      B00111111,B10000000,
598
+      B00011111,B00000000,
599
+      B00001110,B00000000,
600
+      B00000100,B00000000
601
+    };
602
+
603
+    const unsigned char offset_bedline_bmp[] PROGMEM = {
604
+      B11111111,B11111111,B11111111
605
+    };
606
+
607
+    const unsigned char nozzle_bmp[] PROGMEM = {
608
+      B01111111,B10000000,
609
+      B11111111,B11000000,
610
+      B11111111,B11000000,
611
+      B11111111,B11000000,
612
+      B01111111,B10000000,
613
+      B01111111,B10000000,
614
+      B11111111,B11000000,
615
+      B11111111,B11000000,
616
+      B11111111,B11000000,
617
+      B00111111,B00000000,
618
+      B00011110,B00000000,
619
+      B00001100,B00000000
620
+    };
621
+
575 622
     void _lcd_zoffset_overlay_gfx(const float zvalue) {
576 623
       // Determine whether the user is raising or lowering the nozzle.
577 624
       static int8_t dir;
@@ -610,4 +657,4 @@ void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
610 657
 
611 658
 #endif // ULTIPANEL
612 659
 
613
-#endif // DOGLCD
660
+#endif // HAS_GRAPHICAL_LCD

+ 37
- 0
Marlin/src/lcd/ultralcd.h View File

@@ -25,6 +25,13 @@
25 25
 
26 26
 #if HAS_GRAPHICAL_LCD
27 27
 
28
+  #ifndef LCD_PIXEL_WIDTH
29
+    #define LCD_PIXEL_WIDTH 128
30
+  #endif
31
+  #ifndef LCD_PIXEL_HEIGHT
32
+    #define LCD_PIXEL_HEIGHT 64
33
+  #endif
34
+
28 35
   // LCD selection
29 36
   #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
30 37
     #define U8G_CLASS U8GLIB_ST7920_128X64_4X
@@ -125,6 +132,19 @@
125 132
   #include "dogm/HAL_LCD_class_defines.h"
126 133
   extern U8G_CLASS u8g;
127 134
 
135
+  // DOGM font sizes
136
+  #define DOG_CHAR_WIDTH         6
137
+  #define DOG_CHAR_HEIGHT        12
138
+  #if ENABLED(USE_BIG_EDIT_FONT)
139
+    #define FONT_MENU_EDIT_NAME u8g_font_9x18
140
+    #define DOG_CHAR_WIDTH_EDIT  9
141
+    #define DOG_CHAR_HEIGHT_EDIT 18
142
+  #else
143
+    #define FONT_MENU_EDIT_NAME FONT_MENU_NAME
144
+    #define DOG_CHAR_WIDTH_EDIT  DOG_CHAR_WIDTH
145
+    #define DOG_CHAR_HEIGHT_EDIT DOG_CHAR_HEIGHT
146
+  #endif
147
+
128 148
   enum MarlinFont : uint8_t {
129 149
     FONT_STATUSMENU = 1,
130 150
     FONT_SPECIAL,
@@ -132,6 +152,23 @@
132 152
     FONT_MENU,
133 153
   };
134 154
 
155
+  // Only Western languages support big / small fonts
156
+  #if DISABLED(DISPLAY_CHARSET_ISO10646_1)
157
+    #undef USE_BIG_EDIT_FONT
158
+    #undef USE_SMALL_INFOFONT
159
+  #endif
160
+
161
+  #if ENABLED(USE_SMALL_INFOFONT)
162
+    extern const u8g_fntpgm_uint8_t u8g_font_6x9[];
163
+    #define INFO_FONT_HEIGHT 7
164
+  #else
165
+    #define INFO_FONT_HEIGHT 8
166
+  #endif
167
+
168
+  // For selective rendering within a Y range
169
+  #define PAGE_UNDER(yb) (u8g.getU8g()->current_page.y0 <= (yb))
170
+  #define PAGE_CONTAINS(ya, yb) (PAGE_UNDER(yb) && u8g.getU8g()->current_page.y1 >= (ya))
171
+
135 172
   void lcd_setFont(const MarlinFont font_nr);
136 173
 
137 174
   #if ENABLED(LIGHTWEIGHT_UI)

Loading…
Cancel
Save