Selaa lähdekoodia

Make MAPPER_NON the fall back mapper

Make MAPPER_NON the fall back mapper - if no other is defined.
One list less to maintain.
AnHardt 8 vuotta sitten
vanhempi
commit
b273736962

+ 0
- 1
Marlin/language_an.h Näytä tiedosto

@@ -30,7 +30,6 @@
30 30
 #ifndef LANGUAGE_AN_H
31 31
 #define LANGUAGE_AN_H
32 32
 
33
-#define MAPPER_NON
34 33
 // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
35 34
 //#define SIMULATE_ROMFONT
36 35
 #define DISPLAY_CHARSET_ISO10646_1

+ 0
- 1
Marlin/language_ca.h Näytä tiedosto

@@ -30,7 +30,6 @@
30 30
 #ifndef LANGUAGE_CA_H
31 31
 #define LANGUAGE_CA_H
32 32
 
33
-//#define MAPPER_NON
34 33
 #define MAPPER_C2C3  // because of "ó"
35 34
 // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
36 35
 //#define SIMULATE_ROMFONT

+ 0
- 2
Marlin/language_cn.h Näytä tiedosto

@@ -29,8 +29,6 @@
29 29
  */
30 30
 #ifndef LANGUAGE_CN_H
31 31
 #define LANGUAGE_CN_H
32
-
33
-#define MAPPER_NON         // For direct ascii codes
34 32
 #define DISPLAY_CHARSET_ISO10646_CN
35 33
 
36 34
 #define WELCOME_MSG                         "\xa4\xa5\xa6\xa7"

+ 0
- 1
Marlin/language_cz.h Näytä tiedosto

@@ -34,7 +34,6 @@
34 34
 #ifndef LANGUAGE_CZ_H
35 35
 #define LANGUAGE_CZ_H
36 36
 
37
-#define MAPPER_NON
38 37
 // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
39 38
 //#define SIMULATE_ROMFONT
40 39
 #define DISPLAY_CHARSET_ISO10646_1

+ 0
- 4
Marlin/language_en.h Näytä tiedosto

@@ -35,10 +35,6 @@
35 35
   #define DISPLAY_CHARSET_ISO10646_1 // use the better font on full graphic displays.
36 36
 #endif
37 37
 
38
-#if DISABLED(MAPPER_NON) && DISABLED(MAPPER_C2C3) && DISABLED(MAPPER_D0D1) && DISABLED(MAPPER_D0D1_MOD) && DISABLED(MAPPER_E382E383) && DISABLED(MAPPER_CECF)
39
-  #define MAPPER_NON         // For direct ascii codes
40
-#endif
41
-
42 38
 #ifndef WELCOME_MSG
43 39
   #define WELCOME_MSG                         MACHINE_NAME " ready."
44 40
 #endif

+ 0
- 1
Marlin/language_es.h Näytä tiedosto

@@ -30,7 +30,6 @@
30 30
 #ifndef LANGUAGE_ES_H
31 31
 #define LANGUAGE_ES_H
32 32
 
33
-#define MAPPER_NON
34 33
 // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
35 34
 //#define SIMULATE_ROMFONT
36 35
 #define DISPLAY_CHARSET_ISO10646_1

+ 0
- 1
Marlin/language_eu.h Näytä tiedosto

@@ -30,7 +30,6 @@
30 30
 #ifndef LANGUAGE_EU_H
31 31
 #define LANGUAGE_EU_H
32 32
 
33
-#define MAPPER_NON
34 33
 // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
35 34
 //#define SIMULATE_ROMFONT
36 35
 #define DISPLAY_CHARSET_ISO10646_1

+ 0
- 1
Marlin/language_fr.h Näytä tiedosto

@@ -30,7 +30,6 @@
30 30
 #ifndef LANGUAGE_FR_H
31 31
 #define LANGUAGE_FR_H
32 32
 
33
-#define MAPPER_NON
34 33
 // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
35 34
 //#define SIMULATE_ROMFONT
36 35
 #define DISPLAY_CHARSET_ISO10646_1

+ 0
- 1
Marlin/language_hr.h Näytä tiedosto

@@ -30,7 +30,6 @@
30 30
 #ifndef LANGUAGE_HR_H
31 31
 #define LANGUAGE_HR_H
32 32
 
33
-#define MAPPER_NON
34 33
 
35 34
 // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
36 35
 //#define SIMULATE_ROMFONT

+ 0
- 1
Marlin/language_it.h Näytä tiedosto

@@ -30,7 +30,6 @@
30 30
 #ifndef LANGUAGE_IT_H
31 31
 #define LANGUAGE_IT_H
32 32
 
33
-#define MAPPER_NON
34 33
 // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
35 34
 //#define SIMULATE_ROMFONT
36 35
 #define DISPLAY_CHARSET_ISO10646_1

+ 0
- 1
Marlin/language_kana.h Näytä tiedosto

@@ -31,7 +31,6 @@
31 31
 #ifndef LANGUAGE_KANA_H
32 32
 #define LANGUAGE_KANA_H
33 33
 
34
-#define MAPPER_NON
35 34
 // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
36 35
 #define SIMULATE_ROMFONT
37 36
 #define DISPLAY_CHARSET_ISO10646_KANA

+ 0
- 1
Marlin/language_nl.h Näytä tiedosto

@@ -30,7 +30,6 @@
30 30
 #ifndef LANGUAGE_NL_H
31 31
 #define LANGUAGE_NL_H
32 32
 
33
-#define MAPPER_NON
34 33
 // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
35 34
 //#define SIMULATE_ROMFONT
36 35
 #define DISPLAY_CHARSET_ISO10646_1

+ 0
- 1
Marlin/language_pl.h Näytä tiedosto

@@ -30,7 +30,6 @@
30 30
 #ifndef LANGUAGE_PL_H
31 31
 #define LANGUAGE_PL_H
32 32
 
33
-#define MAPPER_NON
34 33
 // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
35 34
 //#define SIMULATE_ROMFONT
36 35
 #define DISPLAY_CHARSET_ISO10646_1

+ 0
- 1
Marlin/language_pt-br.h Näytä tiedosto

@@ -30,7 +30,6 @@
30 30
 #ifndef LANGUAGE_PT_BR_H
31 31
 #define LANGUAGE_PT_BR_H
32 32
 
33
-#define MAPPER_NON
34 33
 // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
35 34
 //#define SIMULATE_ROMFONT
36 35
 #define DISPLAY_CHARSET_ISO10646_1

+ 0
- 1
Marlin/language_pt-br_utf8.h Näytä tiedosto

@@ -30,7 +30,6 @@
30 30
 #ifndef LANGUAGE_PT_BR_UTF_H
31 31
 #define LANGUAGE_PT_BR_UTF_H
32 32
 
33
-#define MAPPER_NON
34 33
 // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
35 34
 //#define SIMULATE_ROMFONT
36 35
 #define DISPLAY_CHARSET_ISO10646_1

+ 0
- 1
Marlin/language_pt.h Näytä tiedosto

@@ -30,7 +30,6 @@
30 30
 #ifndef LANGUAGE_PT_H
31 31
 #define LANGUAGE_PT_H
32 32
 
33
-#define MAPPER_NON
34 33
 // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
35 34
 //#define SIMULATE_ROMFONT
36 35
 #define DISPLAY_CHARSET_ISO10646_1

+ 0
- 1
Marlin/language_pt_utf8.h Näytä tiedosto

@@ -30,7 +30,6 @@
30 30
 #ifndef LANGUAGE_PT_UTF_H
31 31
 #define LANGUAGE_PT_UTF_H
32 32
 
33
-#define MAPPER_NON
34 33
 // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
35 34
 //#define SIMULATE_ROMFONT
36 35
 #define DISPLAY_CHARSET_ISO10646_1

+ 1
- 2
Marlin/language_test.h Näytä tiedosto

@@ -46,11 +46,10 @@
46 46
 //   Kanji (an other Japanese symbol set) uses far more than two codepages. So currently I don't see a chance to map the Unicodes. Its not
47 47
 //   impossible to have a close to direct mapping but will need giant conversion tables and fonts (we don't want to have in a embedded system).
48 48
 
49
-
50
-#define MAPPER_NON         // For direct ascii codes ( until now all languages except ru, de, fi, kana_utf8, ... )
51 49
 //#define MAPPER_C2C3        // For most European languages when language file is in utf8
52 50
 //#define MAPPER_D0D1        // For Cyrillic
53 51
 //#define MAPPER_E382E383    // For Katakana
52
+//#define MAPPER_NON         // For direct ascii codes. Fall back mapper - if no other is defined.
54 53
 
55 54
 // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h
56 55
 //#define SIMULATE_ROMFONT

+ 8
- 10
Marlin/utf_mapper.h Näytä tiedosto

@@ -146,14 +146,7 @@
146 146
   #endif // DISPLAY_CHARSET_HD44780
147 147
 #endif // SIMULATE_ROMFONT
148 148
 
149
-#if ENABLED(MAPPER_NON)
150
-
151
-  char charset_mapper(char c) {
152
-    HARDWARE_CHAR_OUT( c );
153
-    return 1;
154
-  }
155
-
156
-#elif ENABLED(MAPPER_C2C3)
149
+#if ENABLED(MAPPER_C2C3)
157 150
 
158 151
   char charset_mapper(char c) {
159 152
     static uint8_t utf_hi_char; // UTF-8 high part
@@ -353,8 +346,13 @@
353 346
 
354 347
 #else
355 348
 
356
-  #error "You have to define one of the DISPLAY_INPUT_CODE_MAPPERs in your language_xx.h file" // should not occur because (en) will set.
349
+  #define MAPPER_NON
350
+
351
+  char charset_mapper(char c) {
352
+    HARDWARE_CHAR_OUT( c );
353
+    return 1;
354
+  }
357 355
 
358
-#endif // code mappers
356
+  #endif // code mappers
359 357
 
360 358
 #endif // UTF_MAPPER_H

Loading…
Peruuta
Tallenna