Browse Source

Merge branch 'codesize' of https://github.com/DRracer/Prusa-Firmware into DRracer_codesize

3d-gussner 3 years ago
parent
commit
5c1da227fe
1 changed files with 5 additions and 10 deletions
  1. 5 10
      Firmware/ultralcd.cpp

+ 5 - 10
Firmware/ultralcd.cpp

@@ -380,13 +380,11 @@ static void lcd_implementation_drawmenu_sdfile_selected(uint8_t row, const char*
         }
     }
     if(c!='\0'){
-      lcd_set_cursor(i, row);
-        lcd_print(c);
+        lcd_putc_at(i, row, c);
         i++;
     }
     n=n-i+1;
-    while(n--)
-        lcd_print(' ');
+    lcd_space(n);
 }
 static void lcd_implementation_drawmenu_sdfile(uint8_t row, const char* filename, char* longFilename)
 {
@@ -404,8 +402,7 @@ static void lcd_implementation_drawmenu_sdfile(uint8_t row, const char* filename
         filename++;
         n--;
     }
-    while(n--)
-        lcd_print(' ');
+    lcd_space(n);
 }
 static void lcd_implementation_drawmenu_sddirectory_selected(uint8_t row, const char* filename, char* longFilename)
 {
@@ -424,8 +421,7 @@ static void lcd_implementation_drawmenu_sddirectory_selected(uint8_t row, const
         filename++;
         n--;
     }
-    while(n--)
-        lcd_print(' ');
+    lcd_space(n);
 }
 static void lcd_implementation_drawmenu_sddirectory(uint8_t row, const char* filename, char* longFilename)
 {
@@ -444,8 +440,7 @@ static void lcd_implementation_drawmenu_sddirectory(uint8_t row, const char* fil
         filename++;
         n--;
     }
-    while(n--)
-        lcd_print(' ');
+    lcd_space(n);
 }