Browse Source

Merge pull request #1733 from AnHardt/c20

Get back folder symbols on Hitachi displays
Scott Lahteine 9 years ago
parent
commit
e63076504d
1 changed files with 8 additions and 8 deletions
  1. 8
    8
      Marlin/ultralcd_implementation_hitachi_HD44780.h

+ 8
- 8
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

@@ -624,7 +624,7 @@ static void lcd_implementation_status_screen()
624 624
 
625 625
 static void lcd_implementation_drawmenu_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char post_char) {
626 626
   char c;
627
-  uint8_t n = LCD_WIDTH - 1 - (LCD_WIDTH < 20 ? 1 : 2);
627
+  uint8_t n = LCD_WIDTH - 2;
628 628
   lcd.setCursor(0, row);
629 629
   lcd.print(sel ? pre_char : ' ');
630 630
   while ((c = pgm_read_byte(pstr)) && n > 0) {
@@ -633,12 +633,11 @@ static void lcd_implementation_drawmenu_generic(bool sel, uint8_t row, const cha
633 633
   }
634 634
   while(n--) lcd.print(' ');
635 635
   lcd.print(post_char);
636
-  lcd.print(' ');
637 636
 }
638 637
 
639 638
 static void lcd_implementation_drawmenu_setting_edit_generic(bool sel, uint8_t row, const char* pstr, char pre_char, char* data) {
640 639
   char c;
641
-  uint8_t n = LCD_WIDTH - 1 - (LCD_WIDTH < 20 ? 1 : 2) - lcd_strlen(data);
640
+  uint8_t n = LCD_WIDTH - 2 - lcd_strlen(data);
642 641
   lcd.setCursor(0, row);
643 642
   lcd.print(sel ? pre_char : ' ');
644 643
   while ((c = pgm_read_byte(pstr)) && n > 0) {
@@ -651,7 +650,7 @@ static void lcd_implementation_drawmenu_setting_edit_generic(bool sel, uint8_t r
651 650
 }
652 651
 static void lcd_implementation_drawmenu_setting_edit_generic_P(bool sel, uint8_t row, const char* pstr, char pre_char, const char* data) {
653 652
   char c;
654
-  uint8_t n = LCD_WIDTH - 1 - (LCD_WIDTH < 20 ? 1 : 2) - lcd_strlen_P(data);
653
+  uint8_t n = LCD_WIDTH - 2 - lcd_strlen_P(data);
655 654
   lcd.setCursor(0, row);
656 655
   lcd.print(sel ? pre_char : ' ');
657 656
   while ((c = pgm_read_byte(pstr)) && n > 0) {
@@ -688,11 +687,11 @@ void lcd_implementation_drawedit(const char* pstr, char* value) {
688 687
   lcd.setCursor(1, 1);
689 688
   lcd_printPGM(pstr);
690 689
   lcd.print(':');
691
-  lcd.setCursor(LCD_WIDTH - (LCD_WIDTH < 20 ? 0 : 1) - lcd_strlen(value), 1);
690
+  lcd.setCursor(LCD_WIDTH - lcd_strlen(value), 1);
692 691
   lcd_print(value);
693 692
 }
694 693
 
695
-static void lcd_implementation_drawmenu_sd(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename, uint8_t concat) {
694
+static void lcd_implementation_drawmenu_sd(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename, uint8_t concat, char post_char) {
696 695
   char c;
697 696
   uint8_t n = LCD_WIDTH - concat;
698 697
   lcd.setCursor(0, row);
@@ -706,14 +705,15 @@ static void lcd_implementation_drawmenu_sd(bool sel, uint8_t row, const char* ps
706 705
     filename++;
707 706
   }
708 707
   while (n--) lcd.print(' ');
708
+  lcd.print(post_char);
709 709
 }
710 710
 
711 711
 static void lcd_implementation_drawmenu_sdfile(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) {
712
-  lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 1);
712
+  lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 2, ' ');
713 713
 }
714 714
 
715 715
 static void lcd_implementation_drawmenu_sddirectory(bool sel, uint8_t row, const char* pstr, const char* filename, char* longFilename) {
716
-  lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 2);
716
+  lcd_implementation_drawmenu_sd(sel, row, pstr, filename, longFilename, 2, LCD_STR_FOLDER[0]);
717 717
 }
718 718
 
719 719
 #define lcd_implementation_drawmenu_back(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0])

Loading…
Cancel
Save