diff --git a/.travis.yml b/.travis.yml index bc5f7ab8b..3d40b1ee0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -107,8 +107,9 @@ script: - opt_enable_adv CUSTOM_USER_MENUS I2C_POSITION_ENCODERS BABYSTEPPING BABYSTEP_XY NANODLP_Z_SYNC - build_marlin # - # Add a Sled Z Probe, use UBL Cartesian moves + # Add a Sled Z Probe, use UBL Cartesian moves, use Japanese language # + - opt_set LANGUAGE kana_utf8 - opt_enable Z_PROBE_SLED SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE - opt_disable SEGMENT_LEVELED_MOVES - opt_enable_adv BABYSTEP_ZPROBE_OFFSET DOUBLECLICK_FOR_Z_BABYSTEPPING diff --git a/Marlin/language_bg.h b/Marlin/language_bg.h index bf80f49ef..5c25f3ea0 100644 --- a/Marlin/language_bg.h +++ b/Marlin/language_bg.h @@ -32,6 +32,7 @@ #define MAPPER_D0D1 // For Cyrillic #define DISPLAY_CHARSET_ISO10646_5 +#define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" Готов.") #define MSG_SD_INSERTED _UxGT("Картата е поставена") diff --git a/Marlin/language_ca.h b/Marlin/language_ca.h index 3103b7cd3..ed3ea4504 100644 --- a/Marlin/language_ca.h +++ b/Marlin/language_ca.h @@ -32,6 +32,7 @@ #define MAPPER_C2C3 // because of "ó" #define DISPLAY_CHARSET_ISO10646_1 +#define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" preparada.") #define MSG_SD_INSERTED _UxGT("Targeta detectada.") diff --git a/Marlin/language_cn.h b/Marlin/language_cn.h index 584dcc4d0..40c330d1a 100644 --- a/Marlin/language_cn.h +++ b/Marlin/language_cn.h @@ -31,6 +31,7 @@ #define LANGUAGE_CN_H #define DISPLAY_CHARSET_ISO10646_CN +#define CHARSIZE 2 #define WELCOME_MSG "\xa4\xa5\xa6\xa7" #define MSG_SD_INSERTED "\xa8\xa9\xaa\xab" diff --git a/Marlin/language_cz_utf8.h b/Marlin/language_cz_utf8.h index d4d4b6f67..f3bf1ebb6 100644 --- a/Marlin/language_cz_utf8.h +++ b/Marlin/language_cz_utf8.h @@ -37,6 +37,7 @@ #define MAPPER_C3C4C5_CZ #define DISPLAY_CHARSET_ISO10646_CZ +#define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" připraven.") #define MSG_BACK _UxGT("Zpět") diff --git a/Marlin/language_da.h b/Marlin/language_da.h index 390726f75..60c9d2ae1 100644 --- a/Marlin/language_da.h +++ b/Marlin/language_da.h @@ -32,6 +32,7 @@ #define MAPPER_C2C3 #define DISPLAY_CHARSET_ISO10646_1 +#define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" er klar") #define MSG_SD_INSERTED _UxGT("Kort isat") diff --git a/Marlin/language_de.h b/Marlin/language_de.h index 658448435..98d9425e1 100644 --- a/Marlin/language_de.h +++ b/Marlin/language_de.h @@ -32,6 +32,7 @@ #define MAPPER_C2C3 #define DISPLAY_CHARSET_ISO10646_1 +#define CHARSIZE 2 #define THIS_LANGUAGES_SPECIAL_SYMBOLS _UxGT("ÄäÖöÜüß²³") diff --git a/Marlin/language_el-gr.h b/Marlin/language_el-gr.h index ee1e42e90..ad2895cfd 100644 --- a/Marlin/language_el-gr.h +++ b/Marlin/language_el-gr.h @@ -32,6 +32,7 @@ #define MAPPER_CECF #define DISPLAY_CHARSET_ISO10646_GREEK +#define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" έτοιμο.") #define MSG_SD_INSERTED _UxGT("Εισαγωγή κάρτας") diff --git a/Marlin/language_el.h b/Marlin/language_el.h index e50ec764c..5211fbe57 100644 --- a/Marlin/language_el.h +++ b/Marlin/language_el.h @@ -32,6 +32,7 @@ #define MAPPER_CECF #define DISPLAY_CHARSET_ISO10646_GREEK +#define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" έτοιμο.") #define MSG_SD_INSERTED _UxGT("Εισαγωγή κάρτας") diff --git a/Marlin/language_en.h b/Marlin/language_en.h index f887b5992..8812de9b8 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -36,6 +36,10 @@ #endif #undef en +#ifndef CHARSIZE + #define CHARSIZE 1 +#endif + #ifndef WELCOME_MSG #define WELCOME_MSG MACHINE_NAME _UxGT(" Ready.") #endif diff --git a/Marlin/language_es.h b/Marlin/language_es.h index 9cdd209d5..fb7d6a275 100644 --- a/Marlin/language_es.h +++ b/Marlin/language_es.h @@ -32,6 +32,7 @@ #define DISPLAY_CHARSET_ISO10646_1 #define NOT_EXTENDED_ISO10646_1_5X7 +#define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" lista.") #define MSG_BACK _UxGT("Atras") diff --git a/Marlin/language_fi.h b/Marlin/language_fi.h index 174d5c420..aa5013f94 100644 --- a/Marlin/language_fi.h +++ b/Marlin/language_fi.h @@ -32,6 +32,7 @@ #define MAPPER_C2C3 #define DISPLAY_CHARSET_ISO10646_1 +#define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" valmis.") #define MSG_SD_INSERTED _UxGT("Kortti asetettu") diff --git a/Marlin/language_fr.h b/Marlin/language_fr.h index c2f2be9a4..615900203 100644 --- a/Marlin/language_fr.h +++ b/Marlin/language_fr.h @@ -32,6 +32,7 @@ #define MAPPER_NON #define NOT_EXTENDED_ISO10646_1_5X7 +#define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" prete.") #define MSG_BACK _UxGT("Retour") diff --git a/Marlin/language_hr.h b/Marlin/language_hr.h index f9e45737b..0cd9b89bd 100644 --- a/Marlin/language_hr.h +++ b/Marlin/language_hr.h @@ -31,6 +31,7 @@ #define LANGUAGE_HR_H #define DISPLAY_CHARSET_ISO10646_1 // use the better font on full graphic displays. +#define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" spreman.") #define MSG_SD_INSERTED _UxGT("SD kartica umetnuta") diff --git a/Marlin/language_kana.h b/Marlin/language_kana.h index 9ee69f2af..76a88be53 100644 --- a/Marlin/language_kana.h +++ b/Marlin/language_kana.h @@ -34,6 +34,7 @@ // 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 +#define CHARSIZE 2 // 片仮名表示定義 #define WELCOME_MSG MACHINE_NAME " ready." diff --git a/Marlin/language_kana_utf8.h b/Marlin/language_kana_utf8.h index 7c7a6eb92..eaa970a28 100644 --- a/Marlin/language_kana_utf8.h +++ b/Marlin/language_kana_utf8.h @@ -34,6 +34,7 @@ #define MAPPER_E382E383 #define DISPLAY_CHARSET_ISO10646_KANA +#define CHARSIZE 3 // This just to show the potential benefit of unicode. // This translation can be improved by using the full charset of unicode codeblock U+30A0 to U+30FF. diff --git a/Marlin/language_pl-DOGM.h b/Marlin/language_pl-DOGM.h index d1e9b070d..a7d3d268c 100644 --- a/Marlin/language_pl-DOGM.h +++ b/Marlin/language_pl-DOGM.h @@ -26,6 +26,7 @@ #ifndef LANGUAGE_PL_DOGM_H #define LANGUAGE_PL_DOGM_H +#define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" gotowy.") #define MSG_SD_INSERTED _UxGT("Karta włożona") diff --git a/Marlin/language_pt-br_utf8.h b/Marlin/language_pt-br_utf8.h index d304b5d8f..1843cfa6e 100644 --- a/Marlin/language_pt-br_utf8.h +++ b/Marlin/language_pt-br_utf8.h @@ -32,6 +32,7 @@ #define LANGUAGE_PT_BR_UTF_H #define DISPLAY_CHARSET_ISO10646_1 +#define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" pronto.") #define MSG_SD_INSERTED _UxGT("Cartão inserido") diff --git a/Marlin/language_pt_utf8.h b/Marlin/language_pt_utf8.h index 56618f7b1..40b3d81b5 100644 --- a/Marlin/language_pt_utf8.h +++ b/Marlin/language_pt_utf8.h @@ -32,6 +32,7 @@ #define LANGUAGE_PT_UTF_H #define DISPLAY_CHARSET_ISO10646_1 +#define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" pronta.") #define MSG_SD_INSERTED _UxGT("Cartão inserido") diff --git a/Marlin/language_ru.h b/Marlin/language_ru.h index c139d82e1..bd89f4562 100644 --- a/Marlin/language_ru.h +++ b/Marlin/language_ru.h @@ -32,6 +32,7 @@ #define MAPPER_D0D1 // For Cyrillic #define DISPLAY_CHARSET_ISO10646_5 +#define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" Готов.") #define MSG_BACK _UxGT("Назад") diff --git a/Marlin/language_sk_utf8.h b/Marlin/language_sk_utf8.h index f0284c367..601e30d3a 100644 --- a/Marlin/language_sk_utf8.h +++ b/Marlin/language_sk_utf8.h @@ -36,6 +36,7 @@ #define MAPPER_C3C4C5_SK #define DISPLAY_CHARSET_ISO10646_SK +#define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" pripravená.") #define MSG_BACK _UxGT("Naspať") diff --git a/Marlin/language_tr.h b/Marlin/language_tr.h index 5b4e74091..fc7432005 100644 --- a/Marlin/language_tr.h +++ b/Marlin/language_tr.h @@ -32,6 +32,7 @@ #define MAPPER_C2C3_TR #define DISPLAY_CHARSET_ISO10646_TR +#define CHARSIZE 2 #if DISABLED(DOGLCD) #error "Turkish needs a graphical display." diff --git a/Marlin/language_uk.h b/Marlin/language_uk.h index 4dac5d0e8..6ae0acfb0 100644 --- a/Marlin/language_uk.h +++ b/Marlin/language_uk.h @@ -32,6 +32,7 @@ #define MAPPER_D0D1 // For Cyrillic #define DISPLAY_CHARSET_ISO10646_5 +#define CHARSIZE 2 #define WELCOME_MSG MACHINE_NAME _UxGT(" готовий.") #define MSG_SD_INSERTED _UxGT("Картка вставлена") diff --git a/Marlin/language_zh_CN.h b/Marlin/language_zh_CN.h index f35ae3faa..2d52c9426 100644 --- a/Marlin/language_zh_CN.h +++ b/Marlin/language_zh_CN.h @@ -30,6 +30,8 @@ #ifndef LANGUAGE_ZH_CN_H #define LANGUAGE_ZH_CN_H +#define CHARSIZE 3 + #define WELCOME_MSG MACHINE_NAME _UxGT("已就绪.") //" ready." #define MSG_SD_INSERTED _UxGT("存储卡已插入") //"Card inserted" #define MSG_SD_REMOVED _UxGT("存储卡被拔出") //"Card removed" diff --git a/Marlin/language_zh_TW.h b/Marlin/language_zh_TW.h index 12682c7b1..f7e0ffac7 100644 --- a/Marlin/language_zh_TW.h +++ b/Marlin/language_zh_TW.h @@ -30,6 +30,8 @@ #ifndef LANGUAGE_ZH_TW_H #define LANGUAGE_ZH_TW_H +#define CHARSIZE 3 + #define WELCOME_MSG MACHINE_NAME _UxGT("已就緒.") //" ready." #define MSG_SD_INSERTED _UxGT("記憶卡已插入") //"Card inserted" #define MSG_SD_REMOVED _UxGT("記憶卡被拔出") //"Card removed" diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 20f92e097..d34d0ef6e 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -82,12 +82,16 @@ int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_spe uint8_t lcd_status_update_delay = 1, // First update one loop delayed lcd_status_message_level; // Higher level blocks lower level -char lcd_status_message[3 * (LCD_WIDTH) + 1] = WELCOME_MSG; // worst case is kana with up to 3*LCD_WIDTH+1 #if ENABLED(STATUS_MESSAGE_SCROLLING) + #define MAX_MESSAGE_LENGTH max(2 * CHARSIZE * LCD_WIDTH, LONG_FILENAME_LENGTH) uint8_t status_scroll_pos = 0; +#else + #define MAX_MESSAGE_LENGTH CHARSIZE * (LCD_WIDTH) #endif +char lcd_status_message[MAX_MESSAGE_LENGTH + 1]; + #if ENABLED(SCROLL_LONG_FILENAMES) uint8_t filename_scroll_pos, filename_scroll_max, filename_scroll_hash; #endif