diff --git a/Marlin/dogm_lcd_implementation.h b/Marlin/dogm_lcd_implementation.h index 110640bcf9..563bc53cf5 100644 --- a/Marlin/dogm_lcd_implementation.h +++ b/Marlin/dogm_lcd_implementation.h @@ -169,7 +169,7 @@ char lcd_print(char c) { } } -char lcd_print(char* str) { +char lcd_print(const char* str) { char c; int i = 0; char n = 0; @@ -508,7 +508,7 @@ static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const c #define lcd_implementation_drawmenu_setting_edit_callback_long5(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_bool(sel, row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) -void lcd_implementation_drawedit(const char* pstr, char* value) { +void lcd_implementation_drawedit(const char* pstr, const char* value) { uint8_t rows = 1; uint8_t lcd_width = LCD_WIDTH, char_width = DOG_CHAR_WIDTH; uint8_t vallen = lcd_strlen(value); diff --git a/Marlin/language_an.h b/Marlin/language_an.h index 86f9bcfd47..488c2eab84 100644 --- a/Marlin/language_an.h +++ b/Marlin/language_an.h @@ -20,6 +20,7 @@ #define MSG_AUTOSTART " Autostart" #define MSG_DISABLE_STEPPERS "Amortar motors" #define MSG_AUTO_HOME "Levar a l'orichen" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Establir zero" #define MSG_PREHEAT_PLA "Precalentar PLA" diff --git a/Marlin/language_bg.h b/Marlin/language_bg.h index e200b67fc2..e84cd0c759 100644 --- a/Marlin/language_bg.h +++ b/Marlin/language_bg.h @@ -20,6 +20,7 @@ #define MSG_AUTOSTART "Автостарт" #define MSG_DISABLE_STEPPERS "Изкл. двигатели" #define MSG_AUTO_HOME "Паркиране" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "Задай Начало" #define MSG_SET_ORIGIN "Изходна точка" #define MSG_PREHEAT_PLA "Подгряване PLA" diff --git a/Marlin/language_ca.h b/Marlin/language_ca.h index b352adfd1c..f6b70baeaf 100644 --- a/Marlin/language_ca.h +++ b/Marlin/language_ca.h @@ -21,6 +21,7 @@ #define MSG_AUTOSTART "Inici automatic" #define MSG_DISABLE_STEPPERS "Apagar motors" #define MSG_AUTO_HOME "Home global" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Establir origen" #define MSG_PREHEAT_PLA "Preescalfar PLA" diff --git a/Marlin/language_cn.h b/Marlin/language_cn.h index 3485067cc5..7aa8a5bbd4 100644 --- a/Marlin/language_cn.h +++ b/Marlin/language_cn.h @@ -18,6 +18,7 @@ #define MSG_AUTOSTART "\xb1\xb2\xb3\xb4" #define MSG_DISABLE_STEPPERS "\xb5\xb6\xb7\xb8\xb9\xba" #define MSG_AUTO_HOME "\xbb\xbc\xbd" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "\xbe\xbf\xbb\xbc\xbd\xc0\xc1" #define MSG_SET_ORIGIN "\xbe\xbf\xbc\xbd" #define MSG_PREHEAT_PLA "\xc3\xc4 PLA" diff --git a/Marlin/language_cz.h b/Marlin/language_cz.h index f32ff0dcfb..b046e53673 100644 --- a/Marlin/language_cz.h +++ b/Marlin/language_cz.h @@ -24,6 +24,7 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Uvolnit motory" #define MSG_AUTO_HOME "Domovska pozice" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "Nastavit ofsety" #define MSG_SET_ORIGIN "Nastavit pocatek" #define MSG_PREHEAT_PLA "Zahrat PLA" diff --git a/Marlin/language_da.h b/Marlin/language_da.h index c18280ad3d..e1afe642a3 100644 --- a/Marlin/language_da.h +++ b/Marlin/language_da.h @@ -21,6 +21,7 @@ #define MSG_AUTO_HOME "Home" // G28 #define MSG_COOLDOWN "Afkøl" #define MSG_DISABLE_STEPPERS "Slå stepper fra" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "Sæt home offsets" #define MSG_SET_ORIGIN "Sæt origin" #define MSG_SWITCH_PS_ON "Slå strøm til" diff --git a/Marlin/language_de.h b/Marlin/language_de.h index 823188dfe0..111efe0586 100644 --- a/Marlin/language_de.h +++ b/Marlin/language_de.h @@ -20,6 +20,7 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Motoren Aus" // M84 #define MSG_AUTO_HOME "Home" // G28 +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "Setze Home hier" #define MSG_SET_ORIGIN "Setze Null hier" //"G92 X0 Y0 Z0" commented out in ultralcd.cpp #define MSG_PREHEAT_PLA "Vorwärmen PLA" diff --git a/Marlin/language_en.h b/Marlin/language_en.h index bc259c96bf..127cd9941c 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -39,6 +39,9 @@ #ifndef MSG_AUTO_HOME #define MSG_AUTO_HOME "Auto home" #endif +#ifndef MSG_LEVEL_BED_HOMING + #define MSG_LEVEL_BED_HOMING "Homing" +#endif #ifndef MSG_SET_HOME_OFFSETS #define MSG_SET_HOME_OFFSETS "Set home offsets" #endif diff --git a/Marlin/language_es.h b/Marlin/language_es.h index 5f0ebae155..cc877ec3a5 100644 --- a/Marlin/language_es.h +++ b/Marlin/language_es.h @@ -20,6 +20,7 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Apagar motores" #define MSG_AUTO_HOME "Llevar al origen" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "Ajustar offsets" #define MSG_SET_ORIGIN "Establecer cero" #define MSG_PREHEAT_PLA "Precalentar PLA" diff --git a/Marlin/language_eu.h b/Marlin/language_eu.h index 6d46fc0a34..896afce6d7 100644 --- a/Marlin/language_eu.h +++ b/Marlin/language_eu.h @@ -20,6 +20,7 @@ #define MSG_AUTOSTART "Auto hasiera" #define MSG_DISABLE_STEPPERS "Itzali motoreak" #define MSG_AUTO_HOME "Hasierara joan" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Hasiera ipini" #define MSG_PREHEAT_PLA "Aurreberotu PLA" diff --git a/Marlin/language_fi.h b/Marlin/language_fi.h index 77cd50b1c5..2937fa75d5 100644 --- a/Marlin/language_fi.h +++ b/Marlin/language_fi.h @@ -20,6 +20,7 @@ #define MSG_AUTOSTART "Automaatti" #define MSG_DISABLE_STEPPERS "Vapauta moottorit" #define MSG_AUTO_HOME "Aja referenssiin" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Aseta origo" #define MSG_PREHEAT_PLA "Esilämmitä PLA" diff --git a/Marlin/language_fr.h b/Marlin/language_fr.h index 91903559e7..60cf1464d9 100644 --- a/Marlin/language_fr.h +++ b/Marlin/language_fr.h @@ -21,6 +21,7 @@ #define MSG_AUTOSTART "Demarrage auto" #define MSG_DISABLE_STEPPERS "Arreter moteurs" #define MSG_AUTO_HOME "Home auto." +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Regler origine" #define MSG_PREHEAT_PLA "Prechauffage PLA" diff --git a/Marlin/language_it.h b/Marlin/language_it.h index 46276b3d28..238906d710 100644 --- a/Marlin/language_it.h +++ b/Marlin/language_it.h @@ -20,6 +20,7 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Disabilita Motori" #define MSG_AUTO_HOME "Auto Home" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "Setta offset home" #define MSG_SET_ORIGIN "Imposta Origine" #define MSG_PREHEAT_PLA "Preriscalda PLA" diff --git a/Marlin/language_kana.h b/Marlin/language_kana.h index 03fa8e27eb..6435e1489c 100644 --- a/Marlin/language_kana.h +++ b/Marlin/language_kana.h @@ -22,6 +22,7 @@ #define MSG_AUTOSTART "\xbc\xde\xc4\xde\xb3\xb6\xb2\xbc" // "Autostart" #define MSG_DISABLE_STEPPERS "\xd3\xb0\xc0\xb0\xc3\xde\xdd\xb9\xde\xdd\x20\xb5\xcc" // "Disable steppers" #define MSG_AUTO_HOME "\xb9\xde\xdd\xc3\xdd\xc6\xb2\xc4\xde\xb3" // "Auto home" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "\xb7\xbc\xde\xad\xdd\xb5\xcc\xbe\xaf\xc4\xbe\xaf\xc3\xb2" // "Set home offsets" #define MSG_SET_ORIGIN "\xb7\xbc\xde\xad\xdd\xbe\xaf\xc4" // "Set origin" #define MSG_PREHEAT_PLA "PLA \xd6\xc8\xc2" // "Preheat PLA" diff --git a/Marlin/language_kana_utf8.h b/Marlin/language_kana_utf8.h index 1b1013554a..716fc37a63 100644 --- a/Marlin/language_kana_utf8.h +++ b/Marlin/language_kana_utf8.h @@ -26,6 +26,7 @@ #define MSG_AUTOSTART "ジドウカイシ" // "Autostart" #define MSG_DISABLE_STEPPERS "モーターデンゲン オフ" // "Disable steppers" #define MSG_AUTO_HOME "ゲンテンニイドウ" // "Auto home" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "キジュンオフセットセッテイ" // "Set home offsets" #define MSG_SET_ORIGIN "キジュンセット" // "Set origin" #define MSG_PREHEAT_PLA "PLA ヨネツ" // "Preheat PLA" diff --git a/Marlin/language_nl.h b/Marlin/language_nl.h index 1b0c4ebdd5..fb28b79f8b 100644 --- a/Marlin/language_nl.h +++ b/Marlin/language_nl.h @@ -20,6 +20,7 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Motoren uit" #define MSG_AUTO_HOME "Auto home" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Nulpunt instellen" #define MSG_PREHEAT_PLA "PLA voorverwarmen" diff --git a/Marlin/language_pl.h b/Marlin/language_pl.h index 9c761176d0..f43071200b 100644 --- a/Marlin/language_pl.h +++ b/Marlin/language_pl.h @@ -20,6 +20,7 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Wylacz silniki" #define MSG_AUTO_HOME "Auto. poz. zerowa" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_ORIGIN "Ustaw punkt zero" #define MSG_PREHEAT_PLA "Rozgrzej PLA" diff --git a/Marlin/language_pt-br.h b/Marlin/language_pt-br.h index aa42910d9b..dc6f7eeb4c 100644 --- a/Marlin/language_pt-br.h +++ b/Marlin/language_pt-br.h @@ -20,6 +20,7 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Desabi. motores" #define MSG_AUTO_HOME "Ir para origen" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "Ajustar Jogo" #define MSG_SET_ORIGIN "Ajustar orig." #define MSG_PREHEAT_PLA "Pre-aquecer PLA" diff --git a/Marlin/language_pt-br_utf.h b/Marlin/language_pt-br_utf.h index 461e875db4..fc8a6adae0 100644 --- a/Marlin/language_pt-br_utf.h +++ b/Marlin/language_pt-br_utf.h @@ -20,6 +20,7 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS "Desabi. motores" #define MSG_AUTO_HOME "Ir para origen" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "Ajustar Jogo" #define MSG_SET_ORIGIN "Ajustar orig." #define MSG_PREHEAT_PLA "Pre-aquecer PLA" diff --git a/Marlin/language_pt.h b/Marlin/language_pt.h index 931ee049df..506c6b8b8e 100644 --- a/Marlin/language_pt.h +++ b/Marlin/language_pt.h @@ -20,6 +20,7 @@ #define MSG_AUTOSTART "Autostart" #define MSG_DISABLE_STEPPERS " Desactivar motores" #define MSG_AUTO_HOME "Ir para origem" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "Def. desvio origem" #define MSG_SET_ORIGIN "Definir origem" #define MSG_PREHEAT_PLA "Pre-aquecer PLA" diff --git a/Marlin/language_ru.h b/Marlin/language_ru.h index a5228e2bc2..e0d8200178 100644 --- a/Marlin/language_ru.h +++ b/Marlin/language_ru.h @@ -20,6 +20,7 @@ #define MSG_AUTOSTART "Автостарт" #define MSG_DISABLE_STEPPERS "Выкл. двигатели" #define MSG_AUTO_HOME "Парковка" +#define MSG_LEVEL_BED_HOMING "Homing" #define MSG_SET_HOME_OFFSETS "Запомнить парковку" #define MSG_SET_ORIGIN "Запомнить ноль" #define MSG_PREHEAT_PLA "Преднагрев PLA" diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index d8aa630fa6..88e0a4415b 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -516,7 +516,7 @@ void lcd_set_home_offsets() { babystepsTodo[axis] += distance; #endif } - if (lcdDrawUpdate) lcd_implementation_drawedit(msg, (char*)""); + if (lcdDrawUpdate) lcd_implementation_drawedit(msg, PSTR("")); if (LCD_CLICKED) lcd_goto_previous_menu(); } @@ -1715,7 +1715,7 @@ void lcd_init() { #endif } -int lcd_strlen(char* s) { +int lcd_strlen(const char* s) { int i = 0, j = 0; while (s[i]) { if ((s[i] & 0xc0) != 0x80) j++; @@ -2397,7 +2397,7 @@ char* ftostr52(const float& x) { * MBL Move to mesh starting point */ static void _lcd_level_bed_homing() { - if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("XYZ"), (char*)"Homing"); + if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("XYZ"), PSTR(MSG_LEVEL_BED_HOMING)); if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]) { current_position[Z_AXIS] = MESH_HOME_SEARCH_Z; plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); diff --git a/Marlin/ultralcd.h b/Marlin/ultralcd.h index 2d4075afc6..30e07f0fa9 100644 --- a/Marlin/ultralcd.h +++ b/Marlin/ultralcd.h @@ -5,7 +5,7 @@ #if ENABLED(ULTRA_LCD) #include "buzzer.h" - int lcd_strlen(char* s); + int lcd_strlen(const char* s); int lcd_strlen_P(const char* s); void lcd_update(); void lcd_init(); diff --git a/Marlin/ultralcd_implementation_hitachi_HD44780.h b/Marlin/ultralcd_implementation_hitachi_HD44780.h index 164afd36d5..e12ec2d8f0 100644 --- a/Marlin/ultralcd_implementation_hitachi_HD44780.h +++ b/Marlin/ultralcd_implementation_hitachi_HD44780.h @@ -407,7 +407,7 @@ char lcd_printPGM(const char* str) { return n; } -char lcd_print(char* str) { +char lcd_print(const char* str) { char c, n = 0; unsigned char i = 0; while ((c = str[i++])) n += charset_mapper(c); @@ -825,7 +825,7 @@ static void lcd_implementation_drawmenu_setting_edit_generic_P(bool sel, uint8_t #define lcd_implementation_drawmenu_setting_edit_callback_long5(sel, row, pstr, pstr2, data, minValue, maxValue, callback) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', ftostr5(*(data))) #define lcd_implementation_drawmenu_setting_edit_callback_bool(sel, row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, '>', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) -void lcd_implementation_drawedit(const char* pstr, char* value) { +void lcd_implementation_drawedit(const char* pstr, const char* value) { lcd.setCursor(1, 1); lcd_printPGM(pstr); lcd.print(':');