From 259794c0bebd38b31c00268b6720aa8c241fd239 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 26 Apr 2016 22:25:50 -0700 Subject: [PATCH 1/2] Make DISPLAY_CHARSET_HD44780 a single setting --- Marlin/Configuration.h | 42 ++++++++++--------- Marlin/SanityCheck.h | 4 +- Marlin/dogm_lcd_implementation.h | 9 ++-- .../Felix/Configuration.h | 42 ++++++++++--------- .../Felix/Configuration_DUAL.h | 42 ++++++++++--------- .../Hephestos/Configuration.h | 42 ++++++++++--------- .../Hephestos_2/Configuration.h | 42 ++++++++++--------- .../K8200/Configuration.h | 42 ++++++++++--------- .../RepRapWorld/Megatronics/Configuration.h | 42 ++++++++++--------- .../RigidBot/Configuration.h | 42 ++++++++++--------- .../SCARA/Configuration.h | 42 ++++++++++--------- .../TAZ4/Configuration.h | 42 ++++++++++--------- .../WITBOX/Configuration.h | 42 ++++++++++--------- .../adafruit/ST7565/Configuration.h | 42 ++++++++++--------- .../delta/biv2.5/Configuration.h | 42 ++++++++++--------- .../delta/generic/Configuration.h | 42 ++++++++++--------- .../delta/kossel_mini/Configuration.h | 42 ++++++++++--------- .../delta/kossel_pro/Configuration.h | 42 ++++++++++--------- .../delta/kossel_xl/Configuration.h | 42 ++++++++++--------- .../makibox/Configuration.h | 42 ++++++++++--------- .../tvrrug/Round2/Configuration.h | 42 ++++++++++--------- Marlin/language.h | 8 ++-- Marlin/utf_mapper.h | 26 ++++++------ 23 files changed, 461 insertions(+), 384 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index edbeb44ab..9ecfad283 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -773,25 +773,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index 89b77578a..9f918781e 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -172,8 +172,8 @@ /** * Required LCD language */ -#if DISABLED(DOGLCD) && ENABLED(ULTRA_LCD) && DISABLED(DISPLAY_CHARSET_HD44780_JAPAN) && DISABLED(DISPLAY_CHARSET_HD44780_WESTERN) && DISABLED(DISPLAY_CHARSET_HD44780_CYRILLIC) - #error You must enable either DISPLAY_CHARSET_HD44780_JAPAN or DISPLAY_CHARSET_HD44780_WESTERN or DISPLAY_CHARSET_HD44780_CYRILLIC for your LCD controller. +#if DISABLED(DOGLCD) && ENABLED(ULTRA_LCD) && !defined(DISPLAY_CHARSET_HD44780) + #error You must set DISPLAY_CHARSET_HD44780 to JAPANESE, WESTERN or CYRILLIC for your LCD controller. #endif /** diff --git a/Marlin/dogm_lcd_implementation.h b/Marlin/dogm_lcd_implementation.h index 0ecbbcbab..3af19e15d 100644 --- a/Marlin/dogm_lcd_implementation.h +++ b/Marlin/dogm_lcd_implementation.h @@ -37,7 +37,8 @@ #define DOGM_LCD_IMPLEMENTATION_H /** - * Implementation of the LCD display routines for a DOGM128 graphic display. These are common LCD 128x64 pixel graphic displays. + * Implementation of the LCD display routines for a DOGM128 graphic display. + * These are common LCD 128x64 pixel graphic displays. */ #if ENABLED(ULTIPANEL) @@ -91,13 +92,13 @@ #define FONT_MENU_NAME ISO10646_1_5x7 #endif #else // SIMULATE_ROMFONT - #if ENABLED(DISPLAY_CHARSET_HD44780_JAPAN) + #if DISPLAY_CHARSET_HD44780 == JAPANESE #include "dogm_font_data_HD44780_J.h" #define FONT_MENU_NAME HD44780_J_5x7 - #elif ENABLED(DISPLAY_CHARSET_HD44780_WESTERN) + #elif DISPLAY_CHARSET_HD44780 == WESTERN #include "dogm_font_data_HD44780_W.h" #define FONT_MENU_NAME HD44780_W_5x7 - #elif ENABLED(DISPLAY_CHARSET_HD44780_CYRILLIC) + #elif DISPLAY_CHARSET_HD44780 == CYRILLIC #include "dogm_font_data_HD44780_C.h" #define FONT_MENU_NAME HD44780_C_5x7 #else // fall-back diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 1cdefc2bc..7c23be9b8 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -755,25 +755,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/example_configurations/Felix/Configuration_DUAL.h b/Marlin/example_configurations/Felix/Configuration_DUAL.h index 3707f72a4..3da920c12 100644 --- a/Marlin/example_configurations/Felix/Configuration_DUAL.h +++ b/Marlin/example_configurations/Felix/Configuration_DUAL.h @@ -752,25 +752,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 395bb8e76..cd666eb50 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -764,25 +764,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index 0dbb1d763..049010894 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -766,25 +766,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 0d43cd2c3..f27691925 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -789,25 +789,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // K8200: for Display VM8201 -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // K8200: for Display VM8201 // // LCD TYPE diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 3f6208345..b86d79efa 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -772,25 +772,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 82b66ef9d..7e5611157 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -767,25 +767,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 808bf7e62..e74071d79 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -780,25 +780,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index 6c8165ea0..8b91f4581 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -793,25 +793,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 434143e38..7e64c3848 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -764,25 +764,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index f941bb0d1..90a702696 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -772,25 +772,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index 40d6e9af8..fd1d0ca7f 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -901,25 +901,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index c492573f5..de116a947 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -901,25 +901,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index e77eb3379..bb9cce1bb 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -905,25 +905,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index b5c9c76c6..4df682192 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -898,25 +898,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index 943443fb4..276a194d7 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -906,25 +906,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 2b414100f..de0dc03a7 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -775,25 +775,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 59cfe714d..d9cd68d7b 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -766,25 +766,29 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -// -// LCD CHARACTER SET -// -// Choose ONE of the following charset options. This selection depends on -// your physical hardware, so it must match your character-based LCD. -// -// Note: This option is NOT applicable to graphical displays. -// -// To find out what type of display you have: -// - Compile and upload with the language (above) set to 'test' -// - Click the controller to view the LCD menu -// -// The LCD will display two lines from the upper half of the character set. -// -// See also https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language -// -#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware -//#define DISPLAY_CHARSET_HD44780_WESTERN -//#define DISPLAY_CHARSET_HD44780_CYRILLIC +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCD's provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language + * + * :['JAPANESE','WESTERN','CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE // // LCD TYPE diff --git a/Marlin/language.h b/Marlin/language.h index e9a30a2d7..a88aacace 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -27,6 +27,10 @@ #define GENERATE_LANGUAGE_INCLUDE(M) STRINGIFY_(language_##M.h) +// For character-based LCD controllers (DISPLAY_CHARSET_HD44780) +#define JAPANESE 1 +#define WESTERN 2 +#define CYRILLIC 3 // NOTE: IF YOU CHANGE LANGUAGE FILES OR MERGE A FILE WITH CHANGES // @@ -232,10 +236,6 @@ // LCD Menu Messages -#if DISABLED(DISPLAY_CHARSET_HD44780_JAPAN) && DISABLED(DISPLAY_CHARSET_HD44780_WESTERN) && DISABLED(DISPLAY_CHARSET_HD44780_CYRILLIC) - #define DISPLAY_CHARSET_HD44780_JAPAN -#endif - #include LANGUAGE_INCLUDE #include "language_en.h" diff --git a/Marlin/utf_mapper.h b/Marlin/utf_mapper.h index 26e97772b..22d5d406c 100644 --- a/Marlin/utf_mapper.h +++ b/Marlin/utf_mapper.h @@ -40,7 +40,7 @@ #define MAPPER_ONE_TO_ONE #endif #else // SIMULATE_ROMFONT - #if ENABLED(DISPLAY_CHARSET_HD44780_JAPAN) + #if DISPLAY_CHARSET_HD44780 == JAPANESE #if ENABLED(MAPPER_C2C3) const PROGMEM uint8_t utf_recode[] = { // 0 1 2 3 4 5 6 7 8 9 a b c d e f This is fair for symbols @@ -77,7 +77,7 @@ #error( "Cyrillic on a japanese dsplay makes no sense. There are no matching symbols."); #endif - #elif ENABLED(DISPLAY_CHARSET_HD44780_WESTERN) + #elif DISPLAY_CHARSET_HD44780 == WESTERN #if ENABLED(MAPPER_C2C3) const PROGMEM uint8_t utf_recode[] = { // 0 1 2 3 4 5 6 7 8 9 a b c d e f This is relative complete. @@ -111,28 +111,28 @@ #error( "Katakana on a western display makes no sense. There are no matching symbols." ); #endif - #elif ENABLED(DISPLAY_CHARSET_HD44780_CYRILLIC) + #elif DISPLAY_CHARSET_HD44780 == CYRILLIC #if ENABLED(MAPPER_D0D1) #define MAPPER_D0D1_MOD // it is a Russian alphabet translation // except 0401 --> 0xa2 = Ё, 0451 --> 0xb5 = ё const PROGMEM uint8_t utf_recode[] = { 0x41,0xa0,0x42,0xa1,0xe0,0x45,0xa3,0xa4, // unicode U+0400 to U+047f - // A Б->Ё B Г Д E Ж З // 0 Ѐ Ё Ђ Ѓ Є Ѕ І Ї + // A Б->Ё B Г Д E Ж З // 0 Ѐ Ё Ђ Ѓ Є Ѕ І Ї 0xa5,0xa6,0x4b,0xa7,0x4d,0x48,0x4f,0xa8, // Ј Љ Њ Ћ Ќ Ѝ Ў Џ - // И Й K Л M H O П // 1 А Б В Г Д Е Ж З + // И Й K Л M H O П // 1 А Б В Г Д Е Ж З 0x50,0x43,0x54,0xa9,0xaa,0x58,0xe1,0xab, // И Й К Л М Н О П - // P C T У Ф X Ч ч // 2 Р С Т У Ф Х Г Ч + // P C T У Ф X Ч ч // 2 Р С Т У Ф Х Г Ч 0xac,0xe2,0xad,0xae,0x62,0xaf,0xb0,0xb1, // Ш Щ Ъ Ы Ь Э Ю Я - // Ш Щ Ъ Ы b Э Ю Я // 3 а б в г д е ж з + // Ш Щ Ъ Ы b Э Ю Я // 3 а б в г д е ж з 0x61,0xb2,0xb3,0xb4,0xe3,0x65,0xb6,0xb7, // и й к л м н о п - // a б->ё в г д e ж з // 4 р с т у ф х ц ч + // a б->ё в г д e ж з // 4 р с т у ф х ц ч 0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0x6f,0xbe, // ш щ ъ ы ь э ю я - // и й к л м н o п // 5 ѐ ё ђ ѓ є ѕ і ї + // и й к л м н o п // 5 ѐ ё ђ ѓ є ѕ і ї 0x70,0x63,0xbf,0x79,0xe4,0x78,0xe5,0xc0, // ј љ њ ћ ќ ѝ ў џ - // p c т y ф x ц ч // 6 Ѡ ѡ Ѣ ѣ Ѥ ѥ Ѧ ѧ + // p c т y ф x ц ч // 6 Ѡ ѡ Ѣ ѣ Ѥ ѥ Ѧ ѧ 0xc1,0xe6,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7 // Ѫ ѩ Ѫ ѫ Ѭ ѭ Ѯ ѯ - // ш щ ъ ы ь э ю я // 7 Ѱ ѱ Ѳ ѳ Ѵ ѵ Ѷ ѷ + // ш щ ъ ы ь э ю я // 7 Ѱ ѱ Ѳ ѳ Ѵ ѵ Ѷ ѷ }; // ѻ ѹ Ѻ ѻ Ѽ ѽ Ѿ ѿ #elif ENABLED(MAPPER_C2C3) #error( "Western languages on a cyrillic display makes no sense. There are no matching symbols." ); @@ -140,8 +140,8 @@ #error( "Katakana on a cyrillic display makes no sense. There are no matching symbols." ); #endif #else - #error("Something went wrong in the selection of DISPLAY_CHARSET_HD44780's"); - #endif // DISPLAY_CHARSET_HD44780_CYRILLIC + #error("Something went wrong in the setting of DISPLAY_CHARSET_HD44780"); + #endif // DISPLAY_CHARSET_HD44780 #endif // SIMULATE_ROMFONT #if ENABLED(MAPPER_NON) From 0c11566f426acf6befd51e9693eece83620696d0 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 26 Apr 2016 23:32:15 -0700 Subject: [PATCH 2/2] Replace LANGUAGE_INCLUDE with LCD_LANGUAGE --- Marlin/Configuration.h | 2 +- Marlin/SanityCheck.h | 2 ++ .../example_configurations/Felix/Configuration.h | 2 +- .../Felix/Configuration_DUAL.h | 2 +- .../Hephestos/Configuration.h | 2 +- .../Hephestos_2/Configuration.h | 2 +- .../example_configurations/K8200/Configuration.h | 2 +- .../RepRapWorld/Megatronics/Configuration.h | 2 +- .../RigidBot/Configuration.h | 2 +- .../example_configurations/SCARA/Configuration.h | 2 +- .../example_configurations/TAZ4/Configuration.h | 2 +- .../WITBOX/Configuration.h | 2 +- .../adafruit/ST7565/Configuration.h | 2 +- .../delta/biv2.5/Configuration.h | 2 +- .../delta/generic/Configuration.h | 2 +- .../delta/kossel_mini/Configuration.h | 2 +- .../delta/kossel_pro/Configuration.h | 2 +- .../delta/kossel_xl/Configuration.h | 2 +- .../makibox/Configuration.h | 2 +- .../tvrrug/Round2/Configuration.h | 2 +- Marlin/language.h | 16 +++++++++------- 21 files changed, 30 insertions(+), 26 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 9ecfad283..e43331483 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -771,7 +771,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index 9f918781e..70553f6f5 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -506,6 +506,8 @@ #error DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Use individual USE_*_PLUG options instead. #elif ENABLED(Z_DUAL_ENDSTOPS) && !defined(Z2_USE_ENDSTOP) #error Z_DUAL_ENDSTOPS settings are simplified. Just set Z2_USE_ENDSTOP to the endstop you want to repurpose for Z2 +#elif defined(LANGUAGE_INCLUDE) + #error LANGUAGE_INCLUDE has been replaced by LCD_LANGUAGE. Please update your configuration. #endif #endif //SANITYCHECK_H diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 7c23be9b8..ca3bf1f8c 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -753,7 +753,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +//#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/Felix/Configuration_DUAL.h b/Marlin/example_configurations/Felix/Configuration_DUAL.h index 3da920c12..0cd247491 100644 --- a/Marlin/example_configurations/Felix/Configuration_DUAL.h +++ b/Marlin/example_configurations/Felix/Configuration_DUAL.h @@ -750,7 +750,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +//#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index cd666eb50..80adf1d2f 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -762,7 +762,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +//#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index 049010894..85d47b07e 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -764,7 +764,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index f27691925..e0959afff 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -787,7 +787,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index b86d79efa..c41b4af61 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -770,7 +770,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 7e5611157..2198dd578 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -765,7 +765,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index e74071d79..f65c2d32d 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -778,7 +778,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +//#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index 8b91f4581..997170a59 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -791,7 +791,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 7e64c3848..2eeb2a3c2 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -762,7 +762,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +//#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 90a702696..f284f7290 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -770,7 +770,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index fd1d0ca7f..80c3f9d3d 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -899,7 +899,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index de116a947..6303c4412 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -899,7 +899,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index bb9cce1bb..dc525e73d 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -903,7 +903,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 4df682192..fc6ad0358 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -896,7 +896,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index 276a194d7..44b835987 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -904,7 +904,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index de0dc03a7..d75cc382b 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -773,7 +773,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +//#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index d9cd68d7b..b68021ca9 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -764,7 +764,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +//#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/language.h b/Marlin/language.h index a88aacace..179b1f710 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -25,7 +25,10 @@ #include "Configuration.h" -#define GENERATE_LANGUAGE_INCLUDE(M) STRINGIFY_(language_##M.h) +// Fallback if no language is set. DON'T CHANGE +#ifndef LCD_LANGUAGE + #define LCD_LANGUAGE en +#endif // For character-based LCD controllers (DISPLAY_CHARSET_HD44780) #define JAPANESE 1 @@ -62,11 +65,6 @@ // cn Chinese // cz Czech -// fallback if no language is set, don't change -#ifndef LANGUAGE_INCLUDE - #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -#endif - #if ENABLED(USE_AUTOMATIC_VERSIONING) #include "_Version.h" #else @@ -236,7 +234,11 @@ // LCD Menu Messages -#include LANGUAGE_INCLUDE +#define LANGUAGE_INCL_(M) STRINGIFY_(language_##M.h) +#define LANGUAGE_INCL(M) LANGUAGE_INCL_(M) +#define INCLUDE_LANGUAGE LANGUAGE_INCL(LCD_LANGUAGE) + +#include INCLUDE_LANGUAGE #include "language_en.h" #endif //__LANGUAGE_H