Browse Source

Update Marlin/ultralcd_implementation_hitachi_HD44780.h

Fix to a bug that I just introduced - sorry. Forgot about offset of string length.
mfeherpataky 12 years ago
parent
commit
bbf0cc1379
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      Marlin/ultralcd_implementation_hitachi_HD44780.h

+ 4
- 4
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

@@ -321,9 +321,9 @@ static void lcd_implementation_drawmenu_setting_edit_generic(uint8_t row, const
321 321
     char c;
322 322
     //Use all characters in narrow LCDs
323 323
   #if LCD_WIDTH < 20
324
-    	uint8_t n = LCD_WIDTH - 1 - 1;
324
+    	uint8_t n = LCD_WIDTH - 1 - 1 - strlen(data);
325 325
     #else
326
-    	uint8_t n = LCD_WIDTH - 1 - 2;
326
+    	uint8_t n = LCD_WIDTH - 1 - 2 - strlen(data);
327 327
   #endif
328 328
     lcd.setCursor(0, row);
329 329
     lcd.print(pre_char);
@@ -343,9 +343,9 @@ static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, cons
343 343
     char c;
344 344
     //Use all characters in narrow LCDs
345 345
   #if LCD_WIDTH < 20
346
-    	uint8_t n = LCD_WIDTH - 1 - 1;
346
+    	uint8_t n = LCD_WIDTH - 1 - 1 - strlen_P(data);
347 347
     #else
348
-    	uint8_t n = LCD_WIDTH - 1 - 2;
348
+    	uint8_t n = LCD_WIDTH - 1 - 2 - strlen_P(data);
349 349
   #endif
350 350
     lcd.setCursor(0, row);
351 351
     lcd.print(pre_char);

Loading…
Cancel
Save