Browse Source

Use lcd_printPGM_utf in more places

Fix #10256
pull/1/head
Scott Lahteine 7 years ago
parent
commit
31df43212c
  1. 6
      Marlin/src/lcd/ultralcd_impl_DOGM.h
  2. 8
      Marlin/src/lcd/ultralcd_impl_HD44780.h

6
Marlin/src/lcd/ultralcd_impl_DOGM.h

@ -412,9 +412,9 @@ void lcd_kill_screen() {
u8g.setPrintPos(0, h4 * 1); u8g.setPrintPos(0, h4 * 1);
lcd_print_utf(lcd_status_message); lcd_print_utf(lcd_status_message);
u8g.setPrintPos(0, h4 * 2); u8g.setPrintPos(0, h4 * 2);
lcd_printPGM(PSTR(MSG_HALTED)); lcd_printPGM_utf(PSTR(MSG_HALTED));
u8g.setPrintPos(0, h4 * 3); u8g.setPrintPos(0, h4 * 3);
lcd_printPGM(PSTR(MSG_PLEASE_RESET)); lcd_printPGM_utf(PSTR(MSG_PLEASE_RESET));
} while (u8g.nextPage()); } while (u8g.nextPage());
} }
@ -581,7 +581,7 @@ void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
bool onpage = PAGE_CONTAINS(baseline + 1 - (DOG_CHAR_HEIGHT_EDIT), baseline); bool onpage = PAGE_CONTAINS(baseline + 1 - (DOG_CHAR_HEIGHT_EDIT), baseline);
if (onpage) { if (onpage) {
u8g.setPrintPos(0, baseline); u8g.setPrintPos(0, baseline);
lcd_printPGM(pstr); lcd_printPGM_utf(pstr);
} }
if (value != NULL) { if (value != NULL) {

8
Marlin/src/lcd/ultralcd_impl_HD44780.h

@ -528,7 +528,7 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) {
lcd_erase_line(3); \ lcd_erase_line(3); \
if (strlen(STRING) <= LCD_WIDTH) { \ if (strlen(STRING) <= LCD_WIDTH) { \
lcd.setCursor((LCD_WIDTH - lcd_strlen_P(PSTR(STRING))) / 2, 3); \ lcd.setCursor((LCD_WIDTH - lcd_strlen_P(PSTR(STRING))) / 2, 3); \
lcd_printPGM(PSTR(STRING)); \ lcd_printPGM_utf(PSTR(STRING)); \
safe_delay(DELAY); \ safe_delay(DELAY); \
} \ } \
else { \ else { \
@ -601,10 +601,10 @@ void lcd_kill_screen() {
lcd.setCursor(0, 2); lcd.setCursor(0, 2);
#else #else
lcd.setCursor(0, 2); lcd.setCursor(0, 2);
lcd_printPGM(PSTR(MSG_HALTED)); lcd_printPGM_utf(PSTR(MSG_HALTED));
lcd.setCursor(0, 3); lcd.setCursor(0, 3);
#endif #endif
lcd_printPGM(PSTR(MSG_PLEASE_RESET)); lcd_printPGM_utf(PSTR(MSG_PLEASE_RESET));
} }
FORCE_INLINE void _draw_axis_label(const AxisEnum axis, const char* const pstr, const bool blink) { FORCE_INLINE void _draw_axis_label(const AxisEnum axis, const char* const pstr, const bool blink) {
@ -1017,7 +1017,7 @@ static void lcd_implementation_status_screen() {
void lcd_implementation_drawedit(const char* pstr, const char* const value=NULL) { void lcd_implementation_drawedit(const char* pstr, const char* const value=NULL) {
lcd.setCursor(1, 1); lcd.setCursor(1, 1);
lcd_printPGM(pstr); lcd_printPGM_utf(pstr);
if (value != NULL) { if (value != NULL) {
lcd.write(':'); lcd.write(':');
const uint8_t valrow = (lcd_strlen_P(pstr) + 1 + lcd_strlen(value) + 1) > (LCD_WIDTH - 2) ? 2 : 1; // Value on the next row if it won't fit const uint8_t valrow = (lcd_strlen_P(pstr) + 1 + lcd_strlen(value) + 1) > (LCD_WIDTH - 2) ? 2 : 1; // Value on the next row if it won't fit

Loading…
Cancel
Save