Pārlūkot izejas kodu

Moved the definitions of the LCD_STR_* to Conditionals.h

to avoid errors in Marlin_main.cpp. #1860

In the include tree of Marlin_main.cpp the decision between the display types is not made.
To include the right LCD_STR_* ether 'dogm_lcd_implementation.h' or 'ultralcd_implementation_hitachi_HD44780.h' with all their code.
A 'dogm_lcd_implementation.h.h' would be a curiosity.
So i moved both of the definition blocks to conditionals.h

On the long term it could make sense to use the same numbering for the u8glib and the hitachi symbols.
AnHardt 9 gadus atpakaļ
vecāks
revīzija
ea897654a4

+ 36
- 7
Marlin/Conditionals.h Parādīt failu

@@ -144,16 +144,45 @@
144 144
     #endif
145 145
   #else //no panel but just LCD
146 146
     #ifdef ULTRA_LCD
147
-    #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
148
-      #define LCD_WIDTH 22
149
-      #define LCD_HEIGHT 5
150
-    #else
151
-      #define LCD_WIDTH 16
152
-      #define LCD_HEIGHT 2
153
-    #endif
147
+      #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
148
+        #define LCD_WIDTH 22
149
+        #define LCD_HEIGHT 5
150
+      #else
151
+        #define LCD_WIDTH 16
152
+        #define LCD_HEIGHT 2
153
+      #endif
154 154
     #endif
155 155
   #endif
156 156
 
157
+  #ifdef DOGLCD
158
+    /* Custom characters defined in font font_6x10_marlin_symbols */
159
+    // \x00 intentionally skipped to avoid problems in strings
160
+    #define LCD_STR_REFRESH     "\x01"
161
+    #define LCD_STR_FOLDER      "\x02"
162
+    #define LCD_STR_ARROW_RIGHT "\x03"
163
+    #define LCD_STR_UPLEVEL     "\x04"
164
+    #define LCD_STR_CLOCK       "\x05"
165
+    #define LCD_STR_FEEDRATE    "\x06"
166
+    #define LCD_STR_BEDTEMP     "\x07"
167
+    #define LCD_STR_THERMOMETER "\x08"
168
+    #define LCD_STR_DEGREE      "\x09"
169
+
170
+    #define LCD_STR_SPECIAL_MAX '\x09'
171
+    // Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin.
172
+    // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
173
+  #else
174
+    /* Custom characters defined in the first 8 characters of the LCD */
175
+    #define LCD_STR_BEDTEMP     "\x00"  // this will have 'unexpected' results when used in a string!
176
+    #define LCD_STR_DEGREE      "\x01"
177
+    #define LCD_STR_THERMOMETER "\x02"
178
+    #define LCD_STR_UPLEVEL     "\x03"
179
+    #define LCD_STR_REFRESH     "\x04"
180
+    #define LCD_STR_FOLDER      "\x05"
181
+    #define LCD_STR_FEEDRATE    "\x06"
182
+    #define LCD_STR_CLOCK       "\x07"
183
+    #define LCD_STR_ARROW_RIGHT ">"  /* from the default character set */
184
+  #endif
185
+
157 186
   /**
158 187
    * Default LCD contrast for dogm-like LCD displays
159 188
    */

+ 0
- 16
Marlin/dogm_lcd_implementation.h Parādīt failu

@@ -108,22 +108,6 @@
108 108
 
109 109
 #define START_ROW              0
110 110
 
111
-/* Custom characters defined in font font_6x10_marlin_symbols */
112
-// \x00 intentionally skipped to avoid problems in strings
113
-#define LCD_STR_REFRESH     "\x01"
114
-#define LCD_STR_FOLDER      "\x02"
115
-#define LCD_STR_ARROW_RIGHT "\x03"
116
-#define LCD_STR_UPLEVEL     "\x04"
117
-#define LCD_STR_CLOCK       "\x05"
118
-#define LCD_STR_FEEDRATE    "\x06"
119
-#define LCD_STR_BEDTEMP     "\x07"
120
-#define LCD_STR_THERMOMETER "\x08"
121
-#define LCD_STR_DEGREE      "\x09"
122
-
123
-#define LCD_STR_SPECIAL_MAX '\x09'
124
-// Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin.
125
-// Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
126
-
127 111
 // LCD selection
128 112
 #ifdef U8GLIB_ST7920
129 113
   //U8GLIB_ST7920_128X64_RRD u8g(0,0,0);

+ 0
- 12
Marlin/ultralcd_implementation_hitachi_HD44780.h Parādīt failu

@@ -201,18 +201,6 @@
201 201
   #define LCD_STR_PROGRESS  "\x03\x04\x05"
202 202
 #endif
203 203
 
204
-/* Custom characters defined in the first 8 characters of the LCD */
205
-#define LCD_STR_BEDTEMP     "\x00"  // this will have 'unexpected' results when used in a string!
206
-#define LCD_STR_DEGREE      "\x01"
207
-#define LCD_STR_THERMOMETER "\x02"
208
-#define LCD_STR_UPLEVEL     "\x03"
209
-#define LCD_STR_REFRESH     "\x04"
210
-#define LCD_STR_FOLDER      "\x05"
211
-#define LCD_STR_FEEDRATE    "\x06"
212
-#define LCD_STR_CLOCK       "\x07"
213
-//#define LCD_STR_ARROW_RIGHT "\x7E"  /* from the default character set. Only available on DISPLAY_CHARSET_HD44780_JAPAN - at this place!*/
214
-#define LCD_STR_ARROW_RIGHT ">"  /* from the default character set */
215
-
216 204
 static void lcd_set_custom_characters(
217 205
   #ifdef LCD_PROGRESS_BAR
218 206
     bool progress_bar_set=true

Notiek ielāde…
Atcelt
Saglabāt