Reuse lcd_space() instead of in-place printing of spaces in a cycle
Saves another ~40B
This commit is contained in:
parent
783e4bbaf9
commit
d8917a304a
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user