Browse Source

Add a test_language.

Will show the compleet utf8 or ASCII charset
To se the second half of ASCII click on "01234..."
AnHardt 9 years ago
parent
commit
0f26f3abf2
1 changed files with 200 additions and 0 deletions
  1. 200
    0
      Marlin/language_test.h

+ 200
- 0
Marlin/language_test.h View File

@@ -0,0 +1,200 @@
1
+/**
2
+ * TEST
3
+ *
4
+ * LCD Menu Messages
5
+ * Please note these are limited to 17 characters!
6
+ *
7
+ */
8
+#ifndef LANGUAGE_TEST_H
9
+#define LANGUAGE_TEST_H
10
+
11
+// Select ONE of the following Mappers. 
12
+// They decide what to do with a symbol in the area of [0x80:0xFF]. They take a symbol of this language file and make them point 
13
+// into an array with 128 cells, where they find the place of the symbol in the font in use.
14
+//
15
+// a.)For ASCII coded Language_xx.h files like (en) there are no occurrences of symbols above 0x7F so no mapper is needed. 
16
+//   If such a symbol appers it is mapped directly into the font. This is the case for the language files we used until now, with all the STR_XX or
17
+//   "\xxx" symbols. All Symbols are only one byte long.
18
+// b.) For Unicoded Language_xx.h files (currently ru and de) the non ASCII [0x00-0x7F] symbols are represented by more then one byte.
19
+//   In the case of two bytes the first is pointing to a 'codepage' and the second to a place in the codepage. These codepages contain 64 symbols.
20
+//   So two of them can be mapped. For most of the European languages the necessary symbols are contained in the pages C2 and C3. Cyrillic uses D0 
21
+//   and D1.
22
+// c.) For katakana (one of the Japanese symbol sets) Unicode uses 3 bytes. Here the second byte also points to a codepage and byte 3 to the symbol.
23
+//   I hope the pages E282 and E283 are sufficient to write katakana.
24
+//   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
25
+//   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).
26
+// d.) So for Kanji we use a very special and selected subset of symbols and the direct mapping like in a).
27
+
28
+//#define MAPPER_NON         // For direct asci codes ( until now all languages except ru, de, ... )
29
+#define MAPPER_C2C3        // For most European languages when language file is in utf8
30
+//#define MAPPER_D0D1        // For Cyrillic
31
+//#define MAPPER_D0D1_MOD    // For Cyrillic on HD44780_CYRILIC (will save 32 byte in the mapper but adds some more decisions)
32
+//#define MAPPER_E382E383    // For Katakana
33
+
34
+
35
+// next 4 lines select variants in this file only
36
+//#define WEST
37
+#define CYRIL
38
+//#define KANA
39
+//#define KANJI
40
+
41
+// TESTSTRINGS
42
+
43
+#define STRG_ASCII_2 " !\"#$%&'()*+,-./"
44
+#define STRG_ASCII_3 "0123456789:;<=>?"
45
+#define STRG_ASCII_4 "@ABCDEFGHIJKLMNO"
46
+#define STRG_ASCII_5 "PQRSTUVWXYZ[\]^_"
47
+#define STRG_ASCII_6 "`abcdefghijklmno"
48
+#define STRG_ASCII_7 "pqrstuvwxyz{|}~"
49
+
50
+#define STRG_C2_a " ¡¢£¤¥¦§¨©ª«¬­®¯"
51
+#define STRG_C2_b "°±²³´µ¶·¸¹º»¼½¾¿"
52
+#define STRG_C3_8 "ÈÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ"
53
+#define STRG_C3_9 "ÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß"
54
+#define STRG_C3_a "àáâãäåæçèéêëìíîï"
55
+#define STRG_C3_b "ðñòóôõö÷øùúûüýþÿ"
56
+
57
+#define STRG_D0_8 "ЈЁЂЃЄЅІЇЈЉЊЋЌЍЎЏ"
58
+#define STRG_D0_9 "АБВГДЕЖЗИЙКЛМНОП"
59
+#define STRG_D0_a "РСТУФХЦЧШЩЪЫЬЭЮЯ"
60
+#define STRG_D0_b "абвгдежзийклмноп"
61
+#define STRG_D1_8 "шстуфхцчшщъыьэюя"
62
+#define STRG_D1_9 "ѐёђѓєѕіїјљњћќѝўџ"
63
+#define STRG_D1_a "ѠѡѢѣѤѥѦѧѨѩѪѫѬѭѮѯ"
64
+#define STRG_D1_b "ѰѱѲѳѴѵѶѷѸѹѺѻѼѽѾѿ"
65
+
66
+#define STRG_E382_8 "よめもゃやゅゆょよらりるれろゎわ"
67
+#define STRG_E382_9 "ゐゑをんゔゕゖ゗゘゙゚゛ ゜ゝゞゟ"
68
+#define STRG_E382_a "゠ァアィイゥウェエォオカガキギク"
69
+#define STRG_E382_b "グケゲコゴサザシジスズセゼソゾタ"
70
+#define STRG_E383_8 "トチヂッツヅテデトドナニヌネノハ"
71
+#define STRG_E383_9 "バパヒビピフブプヘベペホボポマミ"
72
+#define STRG_E383_a "ムメモャヤュユョヨラリルレロヮワ"
73
+#define STRG_E383_b "ヰヱヲンヴヵヶヷヸヹヺ・ーヽヾヿ"
74
+
75
+#define STRG_OKTAL_0 "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017"
76
+#define STRG_OKTAL_1 "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
77
+#define STRG_OKTAL_2 "\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057"
78
+#define STRG_OKTAL_3 "\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077"
79
+#define STRG_OKTAL_4 "\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117"
80
+#define STRG_OKTAL_5 "\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137"
81
+#define STRG_OKTAL_6 "\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157"
82
+#define STRG_OKTAL_7 "\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177"
83
+#define STRG_OKTAL_8 "\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217"
84
+#define STRG_OKTAL_9 "\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237"
85
+#define STRG_OKTAL_a "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257"
86
+#define STRG_OKTAL_b "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277"
87
+#define STRG_OKTAL_c "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317"
88
+#define STRG_OKTAL_d "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337"
89
+#define STRG_OKTAL_e "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357"
90
+#define STRG_OKTAL_f "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377"
91
+
92
+#ifdef WEST
93
+  #define WELCOME_MSG                         "Language TEST"
94
+
95
+  #define MSG_WATCH                           "\001\002\003\004\005\006\007\010\011"
96
+  #define MSG_PREPARE                         "UTF8"
97
+  #define MSG_CONTROL                         "ASCII"
98
+
99
+  //#define MSG_MAIN                            ".."
100
+  #define MSG_DISABLE_STEPPERS                STRG_C2_8
101
+  #define MSG_AUTO_HOME                       STRG_C2_9
102
+  #define MSG_SET_HOME_OFFSETS                STRG_C2_a
103
+  #define MSG_PREHEAT_PLA                     STRG_C2_b
104
+  #define MSG_PREHEAT_ABS                     STRG_C3_8
105
+  #define MSG_COOLDOWN                        STRG_C3_9
106
+  #define MSG_SWITCH_PS_OFF                   STRG_C3_a
107
+  #define MSG_MOVE_AXIS                       STRG_C3_b
108
+  
109
+  #define MSG_MAIN                            STRG_OKTAL_2
110
+  #define MSG_TEMPERATURE                     STRG_OKTAL_3
111
+  #define MSG_MOTION                          STRG_OKTAL_4
112
+  #define MSG_VOLUMETRIC                      STRG_OKTAL_5
113
+  #define MSG_CONTRAST                        STRG_OKTAL_6
114
+  #define MSG_RESTORE_FAILSAFE                STRG_OKTAL_7
115
+  
116
+  #define MSG_NOZZLE                          STRG_OKTAL_8
117
+  #define MSG_FAN_SPEED                       STRG_OKTAL_9
118
+  #define MSG_AUTOTEMP                        STRG_OKTAL_a
119
+  #define MSG_MIN                             STRG_OKTAL_b
120
+  #define MSG_MAX                             STRG_OKTAL_c
121
+  #define MSG_FACTOR                          STRG_OKTAL_d
122
+  #define MSG_PID_P                           STRG_OKTAL_e
123
+  #define MSG_PID_I                           STRG_OKTAL_f
124
+
125
+#endif
126
+
127
+#ifdef CYRIL
128
+  #define WELCOME_MSG                         "Language TEST"
129
+
130
+  #define MSG_WATCH                           "\001\002\003\004\005\006\007\010\011"
131
+  #define MSG_PREPARE                         "UTF8"
132
+  #define MSG_CONTROL                         "ASCII"
133
+
134
+  //#define MSG_MAIN                            ".."
135
+  #define MSG_DISABLE_STEPPERS                STRG_D0_8
136
+  #define MSG_AUTO_HOME                       STRG_D0_9
137
+  #define MSG_SET_HOME_OFFSETS                STRG_D0_a
138
+  #define MSG_PREHEAT_PLA                     STRG_D0_b
139
+  #define MSG_PREHEAT_ABS                     STRG_D1_8
140
+  #define MSG_COOLDOWN                        STRG_D1_9
141
+  #define MSG_SWITCH_PS_OFF                   STRG_D1_a
142
+  #define MSG_MOVE_AXIS                       STRG_D1_b
143
+  
144
+  #define MSG_MAIN                            STRG_OKTAL_2
145
+  #define MSG_TEMPERATURE                     STRG_OKTAL_3
146
+  #define MSG_MOTION                          STRG_OKTAL_4
147
+  #define MSG_VOLUMETRIC                      STRG_OKTAL_5
148
+  #define MSG_CONTRAST                        STRG_OKTAL_6
149
+  #define MSG_RESTORE_FAILSAFE                STRG_OKTAL_7
150
+  
151
+  #define MSG_NOZZLE                          STRG_OKTAL_8
152
+  #define MSG_FAN_SPEED                       STRG_OKTAL_9
153
+  #define MSG_AUTOTEMP                        STRG_OKTAL_a
154
+  #define MSG_MIN                             STRG_OKTAL_b
155
+  #define MSG_MAX                             STRG_OKTAL_c
156
+  #define MSG_FACTOR                          STRG_OKTAL_d
157
+  #define MSG_PID_P                           STRG_OKTAL_e
158
+  #define MSG_PID_I                           STRG_OKTAL_f
159
+
160
+#endif
161
+
162
+#if defined( KANA ) || defined (KANJI) 
163
+  #define WELCOME_MSG                         "Language TEST"
164
+
165
+  #define MSG_WATCH                           "\001\002\003\004\005\006\007\010\011"
166
+  #ifdef KANJI
167
+    #define MSG_PREPARE                       "No UTF8 for Kanji"
168
+  #else
169
+    #define MSG_PREPARE                       "UTF8"
170
+  #endif
171
+  #define MSG_CONTROL                         "ASCII"
172
+
173
+  //#define MSG_MAIN                            ".."
174
+  #define MSG_DISABLE_STEPPERS                STRG_E382_8
175
+  #define MSG_AUTO_HOME                       STRG_E382_9
176
+  #define MSG_SET_HOME_OFFSETS                STRG_E382_a
177
+  #define MSG_PREHEAT_PLA                     STRG_E382_b
178
+  #define MSG_PREHEAT_ABS                     STRG_E383_8
179
+  #define MSG_COOLDOWN                        STRG_E383_9
180
+  #define MSG_SWITCH_PS_OFF                   STRG_E383_a
181
+  #define MSG_MOVE_AXIS                       STRG_E383_b
182
+  
183
+  #define MSG_MAIN                            STRG_OKTAL_2
184
+  #define MSG_TEMPERATURE                     STRG_OKTAL_3
185
+  #define MSG_MOTION                          STRG_OKTAL_4
186
+  #define MSG_VOLUMETRIC                      STRG_OKTAL_5
187
+  #define MSG_CONTRAST                        STRG_OKTAL_6
188
+  #define MSG_RESTORE_FAILSAFE                STRG_OKTAL_7
189
+  
190
+  #define MSG_NOZZLE                          STRG_OKTAL_8
191
+  #define MSG_FAN_SPEED                       STRG_OKTAL_9
192
+  #define MSG_AUTOTEMP                        STRG_OKTAL_a
193
+  #define MSG_MIN                             STRG_OKTAL_b
194
+  #define MSG_MAX                             STRG_OKTAL_c
195
+  #define MSG_FACTOR                          STRG_OKTAL_d
196
+  #define MSG_PID_P                           STRG_OKTAL_e
197
+  #define MSG_PID_I                           STRG_OKTAL_f
198
+#endif
199
+
200
+#endif // LANGUAGE_TEST_H

Loading…
Cancel
Save