From bbf0cc13790f56ac8c5ce7ba741d08b1b6278f34 Mon Sep 17 00:00:00 2001 From: mfeherpataky Date: Tue, 12 Feb 2013 20:06:51 +0100 Subject: [PATCH] Update Marlin/ultralcd_implementation_hitachi_HD44780.h Fix to a bug that I just introduced - sorry. Forgot about offset of string length. --- Marlin/ultralcd_implementation_hitachi_HD44780.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/ultralcd_implementation_hitachi_HD44780.h b/Marlin/ultralcd_implementation_hitachi_HD44780.h index 428d449..1d19b77 100644 --- a/Marlin/ultralcd_implementation_hitachi_HD44780.h +++ b/Marlin/ultralcd_implementation_hitachi_HD44780.h @@ -321,9 +321,9 @@ static void lcd_implementation_drawmenu_setting_edit_generic(uint8_t row, const char c; //Use all characters in narrow LCDs #if LCD_WIDTH < 20 - uint8_t n = LCD_WIDTH - 1 - 1; + uint8_t n = LCD_WIDTH - 1 - 1 - strlen(data); #else - uint8_t n = LCD_WIDTH - 1 - 2; + uint8_t n = LCD_WIDTH - 1 - 2 - strlen(data); #endif lcd.setCursor(0, row); lcd.print(pre_char); @@ -343,9 +343,9 @@ static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, cons char c; //Use all characters in narrow LCDs #if LCD_WIDTH < 20 - uint8_t n = LCD_WIDTH - 1 - 1; + uint8_t n = LCD_WIDTH - 1 - 1 - strlen_P(data); #else - uint8_t n = LCD_WIDTH - 1 - 2; + uint8_t n = LCD_WIDTH - 1 - 2 - strlen_P(data); #endif lcd.setCursor(0, row); lcd.print(pre_char);