diff --git a/Marlin/language_an.h b/Marlin/language_an.h index 968fa5168f92033972263026bc00afc8300a1f95..37ae982e19657341bfbb9138a3375a37bc5bacab 100644 --- a/Marlin/language_an.h +++ b/Marlin/language_an.h @@ -30,7 +30,6 @@ #ifndef LANGUAGE_AN_H #define LANGUAGE_AN_H -#define MAPPER_NON // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h //#define SIMULATE_ROMFONT #define DISPLAY_CHARSET_ISO10646_1 diff --git a/Marlin/language_ca.h b/Marlin/language_ca.h index 9c2ba49d3062eae137c7533cd16c615300301fbf..1c2e4924be6eadc9e7b86bfdabc1a7f5d2c1c240 100644 --- a/Marlin/language_ca.h +++ b/Marlin/language_ca.h @@ -30,7 +30,6 @@ #ifndef LANGUAGE_CA_H #define LANGUAGE_CA_H -//#define MAPPER_NON #define MAPPER_C2C3 // because of "รณ" // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h //#define SIMULATE_ROMFONT diff --git a/Marlin/language_cn.h b/Marlin/language_cn.h index e2306a401d66380060823b0d7049c9b59106da7c..de52af44fff46d1468c5cd0b6232d9c4c7a4aefb 100644 --- a/Marlin/language_cn.h +++ b/Marlin/language_cn.h @@ -29,8 +29,6 @@ */ #ifndef LANGUAGE_CN_H #define LANGUAGE_CN_H - -#define MAPPER_NON // For direct ascii codes #define DISPLAY_CHARSET_ISO10646_CN #define WELCOME_MSG "\xa4\xa5\xa6\xa7" diff --git a/Marlin/language_cz.h b/Marlin/language_cz.h index a4bfdf933582cbf28c7e02384859304640818674..030b92e85e192ecf68647314f6c068c87e7c0e4b 100644 --- a/Marlin/language_cz.h +++ b/Marlin/language_cz.h @@ -34,7 +34,6 @@ #ifndef LANGUAGE_CZ_H #define LANGUAGE_CZ_H -#define MAPPER_NON // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h //#define SIMULATE_ROMFONT #define DISPLAY_CHARSET_ISO10646_1 diff --git a/Marlin/language_en.h b/Marlin/language_en.h index 57bc4a5fa87c9f49118306d8a562edf623b80c52..a1612bdf21907b1b8f0789f100b51805ee329616 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -35,10 +35,6 @@ #define DISPLAY_CHARSET_ISO10646_1 // use the better font on full graphic displays. #endif -#if DISABLED(MAPPER_NON) && DISABLED(MAPPER_C2C3) && DISABLED(MAPPER_D0D1) && DISABLED(MAPPER_D0D1_MOD) && DISABLED(MAPPER_E382E383) && DISABLED(MAPPER_CECF) - #define MAPPER_NON // For direct ascii codes -#endif - #ifndef WELCOME_MSG #define WELCOME_MSG MACHINE_NAME " ready." #endif diff --git a/Marlin/language_es.h b/Marlin/language_es.h index 9722ccd2ef92a42f1fa30828264d2879dc78e6c8..c5b3e0e7a4ba6e1490c51ead8798315a82cb1b24 100644 --- a/Marlin/language_es.h +++ b/Marlin/language_es.h @@ -30,7 +30,6 @@ #ifndef LANGUAGE_ES_H #define LANGUAGE_ES_H -#define MAPPER_NON // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h //#define SIMULATE_ROMFONT #define DISPLAY_CHARSET_ISO10646_1 diff --git a/Marlin/language_eu.h b/Marlin/language_eu.h index f87ac2f1c19439541ba3443877912ac5dce88423..361fe0c4575f2e605fcb3f8e96dda1b989651874 100644 --- a/Marlin/language_eu.h +++ b/Marlin/language_eu.h @@ -30,7 +30,6 @@ #ifndef LANGUAGE_EU_H #define LANGUAGE_EU_H -#define MAPPER_NON // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h //#define SIMULATE_ROMFONT #define DISPLAY_CHARSET_ISO10646_1 diff --git a/Marlin/language_fr.h b/Marlin/language_fr.h index f22abce00f3f6daacc44f3d5dbb1196d9f4d8be5..63bba3c3ff7b9765be98b8d708e64634f7a5d624 100644 --- a/Marlin/language_fr.h +++ b/Marlin/language_fr.h @@ -30,7 +30,6 @@ #ifndef LANGUAGE_FR_H #define LANGUAGE_FR_H -#define MAPPER_NON // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h //#define SIMULATE_ROMFONT #define DISPLAY_CHARSET_ISO10646_1 diff --git a/Marlin/language_hr.h b/Marlin/language_hr.h index d48e58ccb14bf188d2bf8d30a00eead0d0ccf296..e6ebe7db80c7123704eeff5b3f073ef1b4af3b6b 100644 --- a/Marlin/language_hr.h +++ b/Marlin/language_hr.h @@ -30,7 +30,6 @@ #ifndef LANGUAGE_HR_H #define LANGUAGE_HR_H -#define MAPPER_NON // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h //#define SIMULATE_ROMFONT diff --git a/Marlin/language_it.h b/Marlin/language_it.h index 481b725abf66fe9d427874f6ab2689c74b58845c..a8e08391f07dd7327a89940129c99c6242a65c8a 100644 --- a/Marlin/language_it.h +++ b/Marlin/language_it.h @@ -30,7 +30,6 @@ #ifndef LANGUAGE_IT_H #define LANGUAGE_IT_H -#define MAPPER_NON // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h //#define SIMULATE_ROMFONT #define DISPLAY_CHARSET_ISO10646_1 diff --git a/Marlin/language_kana.h b/Marlin/language_kana.h index 7eb6f592a5d4bd27827ea392e35115170fcdb4bf..3a824e9ae7ccddd0bc1b45d1696e76be598612ac 100644 --- a/Marlin/language_kana.h +++ b/Marlin/language_kana.h @@ -31,7 +31,6 @@ #ifndef LANGUAGE_KANA_H #define LANGUAGE_KANA_H -#define MAPPER_NON // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h #define SIMULATE_ROMFONT #define DISPLAY_CHARSET_ISO10646_KANA diff --git a/Marlin/language_nl.h b/Marlin/language_nl.h index c74ad8fbd76f9cbf4373ce2b8f15988990a12feb..4dd07d82e8528f6f528610de36542139e41ef7db 100644 --- a/Marlin/language_nl.h +++ b/Marlin/language_nl.h @@ -30,7 +30,6 @@ #ifndef LANGUAGE_NL_H #define LANGUAGE_NL_H -#define MAPPER_NON // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h //#define SIMULATE_ROMFONT #define DISPLAY_CHARSET_ISO10646_1 diff --git a/Marlin/language_pl.h b/Marlin/language_pl.h index 9c38a6db51f3089e8b110e31333e669054fd2df8..71d664c3c1f34eee8842ff7b22d867ec155d2759 100644 --- a/Marlin/language_pl.h +++ b/Marlin/language_pl.h @@ -30,7 +30,6 @@ #ifndef LANGUAGE_PL_H #define LANGUAGE_PL_H -#define MAPPER_NON // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h //#define SIMULATE_ROMFONT #define DISPLAY_CHARSET_ISO10646_1 diff --git a/Marlin/language_pt-br.h b/Marlin/language_pt-br.h index cc37f31dae9138b66fdd439cc568e12a2ea7b2a7..e9f27ecc800813b4b68b045e3184114ef89b6ec5 100644 --- a/Marlin/language_pt-br.h +++ b/Marlin/language_pt-br.h @@ -30,7 +30,6 @@ #ifndef LANGUAGE_PT_BR_H #define LANGUAGE_PT_BR_H -#define MAPPER_NON // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h //#define SIMULATE_ROMFONT #define DISPLAY_CHARSET_ISO10646_1 diff --git a/Marlin/language_pt-br_utf8.h b/Marlin/language_pt-br_utf8.h index feb38b49685115cf2bba94949aafd51860ee9ea7..2909b3d55241b9d33efc222bf4d2a850d21bfea8 100644 --- a/Marlin/language_pt-br_utf8.h +++ b/Marlin/language_pt-br_utf8.h @@ -30,7 +30,6 @@ #ifndef LANGUAGE_PT_BR_UTF_H #define LANGUAGE_PT_BR_UTF_H -#define MAPPER_NON // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h //#define SIMULATE_ROMFONT #define DISPLAY_CHARSET_ISO10646_1 diff --git a/Marlin/language_pt.h b/Marlin/language_pt.h index 4c857a7c1dae1186b347ef47469fb9e567c98789..2e88f11922eae1f4db9a3346faec6a8d08f28b31 100644 --- a/Marlin/language_pt.h +++ b/Marlin/language_pt.h @@ -30,7 +30,6 @@ #ifndef LANGUAGE_PT_H #define LANGUAGE_PT_H -#define MAPPER_NON // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h //#define SIMULATE_ROMFONT #define DISPLAY_CHARSET_ISO10646_1 diff --git a/Marlin/language_pt_utf8.h b/Marlin/language_pt_utf8.h index c2fab4d63677a3e3f72a47a8517543114156ae4a..9040951b3f866d3ce55088e393f4565acb490fb0 100644 --- a/Marlin/language_pt_utf8.h +++ b/Marlin/language_pt_utf8.h @@ -30,7 +30,6 @@ #ifndef LANGUAGE_PT_UTF_H #define LANGUAGE_PT_UTF_H -#define MAPPER_NON // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h //#define SIMULATE_ROMFONT #define DISPLAY_CHARSET_ISO10646_1 diff --git a/Marlin/language_test.h b/Marlin/language_test.h index d2f99f68763b4bc45800991782e00c6bab871be4..ea1b0c4dbc3b2873ccada5b569b519c951748abd 100644 --- a/Marlin/language_test.h +++ b/Marlin/language_test.h @@ -46,11 +46,10 @@ // 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 // 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). - -#define MAPPER_NON // For direct ascii codes ( until now all languages except ru, de, fi, kana_utf8, ... ) //#define MAPPER_C2C3 // For most European languages when language file is in utf8 //#define MAPPER_D0D1 // For Cyrillic //#define MAPPER_E382E383 // For Katakana +//#define MAPPER_NON // For direct ascii codes. Fall back mapper - if no other is defined. // Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h //#define SIMULATE_ROMFONT diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 00c9a05c618a00829882b45097b4d9876cb15781..00f9065c4beb33bee91d4800f9e6ec36aac6c134 100755 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -2476,7 +2476,11 @@ void lcd_init() { int lcd_strlen(const char* s) { int i = 0, j = 0; while (s[i]) { - if ((s[i] & 0xc0) != 0x80) j++; + #ifdef MAPPER_NON + j++; + #else + if ((s[i] & 0xc0) != 0x80) j++; + #endif i++; } return j; @@ -2485,7 +2489,11 @@ int lcd_strlen(const char* s) { int lcd_strlen_P(const char* s) { int j = 0; while (pgm_read_byte(s)) { - if ((pgm_read_byte(s) & 0xc0) != 0x80) j++; + #ifdef MAPPER_NON + j++; + #else + if ((pgm_read_byte(s) & 0xc0) != 0x80) j++; + #endif s++; } return j; diff --git a/Marlin/utf_mapper.h b/Marlin/utf_mapper.h index 829741756faeafb4a7b1cd8305e7812244f904e2..bba85e180d06b7ab6ccd1e0a97454900bfe2ee7f 100644 --- a/Marlin/utf_mapper.h +++ b/Marlin/utf_mapper.h @@ -146,14 +146,7 @@ #endif // DISPLAY_CHARSET_HD44780 #endif // SIMULATE_ROMFONT -#if ENABLED(MAPPER_NON) - - char charset_mapper(char c) { - HARDWARE_CHAR_OUT( c ); - return 1; - } - -#elif ENABLED(MAPPER_C2C3) +#if ENABLED(MAPPER_C2C3) char charset_mapper(char c) { static uint8_t utf_hi_char; // UTF-8 high part @@ -353,8 +346,13 @@ #else - #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. + #define MAPPER_NON + + char charset_mapper(char c) { + HARDWARE_CHAR_OUT( c ); + return 1; + } -#endif // code mappers + #endif // code mappers #endif // UTF_MAPPER_H