From 8dce5a664409365ad6216766083a2163980dda9f Mon Sep 17 00:00:00 2001 From: AnHardt Date: Sun, 1 Feb 2015 13:09:59 +0100 Subject: [PATCH 1/5] Improve new charset featur. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Select DOGM-displays automaticly. Give hint where to find charsets. Add '²' and '³' characters. --- Marlin/language.h | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/Marlin/language.h b/Marlin/language.h index dcaddede5..ef6bf2e25 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -161,25 +161,19 @@ // LCD Menu Messages -#define STR_Ae "Ae" // No charset known now. Default will be overruled when we know. -#define STR_ae "ae" -#define STR_Oe "Oe" -#define STR_oe "oe" -#define STR_Ue "Ue" -#define STR_ue "ue" -#define STR_sz "ss" -#define STR_Deg "" -#define STR_THERMOMETER "\302" - -#ifdef DISPLAY_CHARSET_DOGM - #define STR_Ae "\304" // U8glib - #define STR_ae "\344" - #define STR_Oe "\326" - #define STR_oe STR_Oe - #define STR_Ue "\334" - #define STR_ue STR_Ue - #define STR_sz "\337" - #define STR_Deg "\260" +// Add your own character. Reference: https://github.com/MarlinFirmware/Marlin/pull/1434 photos +// and https://www.sparkfun.com/datasheets/LCD/HD44780.pdf page 17-18 +#ifdef DOGLCD + #define STR_Ae "\304" // 'Ä' U8glib + #define STR_ae "\344" // 'ä' + #define STR_Oe "\326" // 'Ö' + #define STR_oe STR_Oe // 'ö' + #define STR_Ue "\334" // 'Ü' + #define STR_ue STR_Ue // 'ü' + #define STR_sz "\337" // 'ß' + #define STR_h2 "\262" // '²' + #define STR_h3 "\263" // '³' + #define STR_Deg "\260" // '°' #define STR_THERMOMETER "\377" #endif #ifdef DISPLAY_CHARSET_HD44870_JAPAN // HD44870 ROM Code: A00 (Japan) @@ -190,6 +184,8 @@ #define STR_ue "\365" #define STR_Ue STR_ue #define STR_sz "\342" + #define STR_h2 "2" + #define STR_h3 "3" #define STR_Deg "\271" #define STR_THERMOMETER "\302" #endif @@ -201,6 +197,8 @@ #define STR_Ue "\212" #define STR_ue "\201" #define STR_sz "\160" + #define STR_h2 "\262" + #define STR_h3 "\263" #define STR_Deg "\337" #define STR_THERMOMETER "\302" #endif From 0e40408ee51b847c548973ac7ba30448afdea560 Mon Sep 17 00:00:00 2001 From: AnHardt Date: Sun, 1 Feb 2015 13:20:58 +0100 Subject: [PATCH 2/5] Make exemplaric use of new display charsets in language_en.h and languag_de.h --- Marlin/language_de.h | 2 +- Marlin/language_en.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/language_de.h b/Marlin/language_de.h index bbad53368..d41df208d 100644 --- a/Marlin/language_de.h +++ b/Marlin/language_de.h @@ -75,7 +75,7 @@ #define MSG_TEMPERATURE "Temperatur" #define MSG_MOTION "Bewegung" #define MSG_VOLUMETRIC "Filament" -#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_VOLUMETRIC_ENABLED "E in mm" STR_h3 #define MSG_FILAMENT_SIZE_EXTRUDER_0 "Filament D 1" #define MSG_FILAMENT_SIZE_EXTRUDER_1 "Filament D 2" #define MSG_FILAMENT_SIZE_EXTRUDER_2 "Filament D 3" diff --git a/Marlin/language_en.h b/Marlin/language_en.h index 55f784e8a..49a22337d 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -46,9 +46,9 @@ #define MSG_FAN_SPEED "Fan speed" #define MSG_FLOW "Flow" #define MSG_CONTROL "Control" -#define MSG_MIN " \002 Min" -#define MSG_MAX " \002 Max" -#define MSG_FACTOR " \002 Fact" +#define MSG_MIN " " STR_THERMOMETER " Min" +#define MSG_MAX " " STR_THERMOMETER " Max" +#define MSG_FACTOR " " STR_THERMOMETER " Fact" #define MSG_AUTOTEMP "Autotemp" #define MSG_ON "On " #define MSG_OFF "Off" @@ -76,7 +76,7 @@ #define MSG_TEMPERATURE "Temperature" #define MSG_MOTION "Motion" #define MSG_VOLUMETRIC "Filament" -#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_VOLUMETRIC_ENABLED "E in mm" STR_h3 #define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" #define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" #define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" From 85385be132a8998ff2bd0d3e746db19873db21dc Mon Sep 17 00:00:00 2001 From: AnHardt Date: Sun, 1 Feb 2015 13:33:25 +0100 Subject: [PATCH 3/5] Removed now automatic define of DISPLAY_CHARSET_DOGM + improved description. --- Marlin/Configuration.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index f5c218dc7..edc3dc296 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -534,10 +534,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //LCD and SD support -// Character based displays can have different extended charsets. If you see strange or missing characters on yours - try an other definition below. -#define DISPLAY_CHARSET_HD44870_JAPAN // "ääööüüß°" -//#define DISPLAY_CHARSET_HD44870_WESTERN // with better support for European languages. "ÄäÖöÜüß°" -//#define DISPLAY_CHARSET_DOGM // for full graphics display "ÄäÖÖÜÜß°" +// Character based displays can have different extended charsets. +#define DISPLAY_CHARSET_HD44870_JAPAN // "ääööüüß23°" +//#define DISPLAY_CHARSET_HD44870_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. //#define ULTRA_LCD //general LCD support, also 16x2 //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) From 26e55471f89af330dfa16b8efc08d7d63cdfd9d1 Mon Sep 17 00:00:00 2001 From: AnHardt Date: Sun, 1 Feb 2015 13:46:32 +0100 Subject: [PATCH 4/5] Update example configurations. --- Marlin/Configuration.h | 2 +- Marlin/example_configurations/Hephestos/Configuration.h | 7 +++---- Marlin/example_configurations/K8200/Configuration.h | 5 +++++ Marlin/example_configurations/SCARA/Configuration.h | 5 +++++ Marlin/example_configurations/WITBOX/Configuration.h | 5 +++++ Marlin/example_configurations/delta/Configuration.h | 5 +++++ Marlin/example_configurations/makibox/Configuration.h | 5 +++++ .../example_configurations/tvrrug/Round2/Configuration.h | 5 +++++ 8 files changed, 34 insertions(+), 5 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index edc3dc296..132155904 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -535,7 +535,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //LCD and SD support // Character based displays can have different extended charsets. -#define DISPLAY_CHARSET_HD44870_JAPAN // "ääööüüß23°" +#define DISPLAY_CHARSET_HD44870_JAPAN // "ääööüüß23°" //#define DISPLAY_CHARSET_HD44870_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. //#define ULTRA_LCD //general LCD support, also 16x2 diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 4694afd45..64e117322 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -540,10 +540,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //LCD and SD support -// Character based displays can have different extended charsets. If you see strange or missing characters on yours - try an other definition below. -#define DISPLAY_CHARSET_HD44870_JAPAN // "ääööüüß°" -//#define DISPLAY_CHARSET_HD44870_WESTERN // with better support for European languages. "ÄäÖöÜüß°" -//#define DISPLAY_CHARSET_DOGM // for full graphics display "ÄäÖÖÜÜß°" +// Character based displays can have different extended charsets. +#define DISPLAY_CHARSET_HD44870_JAPAN // "ääööüüß23°" +//#define DISPLAY_CHARSET_HD44870_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. #define ULTRA_LCD //general LCD support, also 16x2 //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 888835e7b..baa6061d6 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -544,6 +544,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of #define ABS_PREHEAT_FAN_SPEED 0 // Insert Value between 0 and 255 //LCD and SD support + +// Character based displays can have different extended charsets. +#define DISPLAY_CHARSET_HD44870_JAPAN // "ääööüüß23°" +//#define DISPLAY_CHARSET_HD44870_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. + //#define ULTRA_LCD //general LCD support, also 16x2 //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define SDSUPPORT // Enable SD Card Support in Hardware Console diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 7d52562c4..43b529570 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -537,6 +537,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of #define ABS_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255 //LCD and SD support + +// Character based displays can have different extended charsets. +#define DISPLAY_CHARSET_HD44870_JAPAN // "ääööüüß23°" +//#define DISPLAY_CHARSET_HD44870_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. + //#define ULTRA_LCD //general LCD support, also 16x2 //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define SDSUPPORT // Enable SD Card Support in Hardware Console diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index dea6c72a0..e5b5b6810 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -538,6 +538,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of #define ABS_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255 //LCD and SD support + +// Character based displays can have different extended charsets. +#define DISPLAY_CHARSET_HD44870_JAPAN // "ääööüüß23°" +//#define DISPLAY_CHARSET_HD44870_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. + #define ULTRA_LCD //general LCD support, also 16x2 //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) #define SDSUPPORT // Enable SD Card Support in Hardware Console diff --git a/Marlin/example_configurations/delta/Configuration.h b/Marlin/example_configurations/delta/Configuration.h index 347c34609..1b19b1ff4 100644 --- a/Marlin/example_configurations/delta/Configuration.h +++ b/Marlin/example_configurations/delta/Configuration.h @@ -441,6 +441,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of #define ABS_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255 //LCD and SD support + +// Character based displays can have different extended charsets. +#define DISPLAY_CHARSET_HD44870_JAPAN // "ääööüüß23°" +//#define DISPLAY_CHARSET_HD44870_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. + //#define ULTRA_LCD //general LCD support, also 16x2 //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define SDSUPPORT // Enable SD Card Support in Hardware Console diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 0781ed60a..f2af1b210 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -509,6 +509,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of #define ABS_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255 //LCD and SD support + +// Character based displays can have different extended charsets. +#define DISPLAY_CHARSET_HD44870_JAPAN // "ääööüüß23°" +//#define DISPLAY_CHARSET_HD44870_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. + //#define ULTRA_LCD //general LCD support, also 16x2 //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) #define SDSUPPORT // Enable SD Card Support in Hardware Console diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index b362753e8..d99d6100c 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -523,6 +523,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of #define ABS_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255 //LCD and SD support + +// Character based displays can have different extended charsets. +#define DISPLAY_CHARSET_HD44870_JAPAN // "ääööüüß23°" +//#define DISPLAY_CHARSET_HD44870_WESTERN // "ÄäÖöÜüß²³°" if you see a '~' instead of a 'arrow_right' at the right of submenuitems - this is the right one. + //#define ULTRA_LCD //general LCD support, also 16x2 //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define SDSUPPORT // Enable SD Card Support in Hardware Console From 2dd43a82b1cc59cc4ad45bc7d1773fcfff5b48c3 Mon Sep 17 00:00:00 2001 From: AnHardt Date: Sun, 1 Feb 2015 14:16:35 +0100 Subject: [PATCH 5/5] Ups. #else added --- Marlin/language.h | 54 +++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/Marlin/language.h b/Marlin/language.h index ef6bf2e25..97f53b541 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -175,34 +175,34 @@ #define STR_h3 "\263" // '³' #define STR_Deg "\260" // '°' #define STR_THERMOMETER "\377" +#else + #ifdef DISPLAY_CHARSET_HD44870_JAPAN // HD44870 ROM Code: A00 (Japan) + #define STR_ae "\xe1" + #define STR_Ae STR_ae + #define STR_oe "\357" + #define STR_Oe STR_oe + #define STR_ue "\365" + #define STR_Ue STR_ue + #define STR_sz "\342" + #define STR_h2 "2" + #define STR_h3 "3" + #define STR_Deg "\271" + #define STR_THERMOMETER "\002" + #endif + #ifdef DISPLAY_CHARSET_HD44870_WESTERN // HD44870 ROM Code: A02 (Western) + #define STR_Ae "\216" + #define STR_ae "\204" + #define STR_Oe "\211" + #define STR_oe "\204" + #define STR_Ue "\212" + #define STR_ue "\201" + #define STR_sz "\160" + #define STR_h2 "\262" + #define STR_h3 "\263" + #define STR_Deg "\337" + #define STR_THERMOMETER "\002" + #endif #endif -#ifdef DISPLAY_CHARSET_HD44870_JAPAN // HD44870 ROM Code: A00 (Japan) - #define STR_ae "\xe1" - #define STR_Ae STR_ae - #define STR_oe "\357" - #define STR_Oe STR_oe - #define STR_ue "\365" - #define STR_Ue STR_ue - #define STR_sz "\342" - #define STR_h2 "2" - #define STR_h3 "3" - #define STR_Deg "\271" - #define STR_THERMOMETER "\302" -#endif -#ifdef DISPLAY_CHARSET_HD44870_WESTERN // HD44870 ROM Code: A02 (Western) - #define STR_Ae "\216" - #define STR_ae "\204" - #define STR_Oe "\211" - #define STR_oe "\204" - #define STR_Ue "\212" - #define STR_ue "\201" - #define STR_sz "\160" - #define STR_h2 "\262" - #define STR_h3 "\263" - #define STR_Deg "\337" - #define STR_THERMOMETER "\302" -#endif - /* #define TESTSTRING000 "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017" #define TESTSTRING020 "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"