limit printed menu text to max 18 characters

This commit is contained in:
DRracer 2019-05-06 12:44:36 +02:00
parent ca965aba7b
commit e5911c42da

2
Firmware/menu.cpp Normal file → Executable file
View file

@ -171,7 +171,7 @@ int menu_draw_item_printf_P(char type_char, const char* format, ...)
static int menu_draw_item_puts_P(char type_char, const char* str)
{
lcd_set_cursor(0, menu_row);
int cnt = lcd_printf_P(PSTR("%c%-18S%c"), (lcd_encoder == menu_item)?'>':' ', str, type_char);
int cnt = lcd_printf_P(PSTR("%c%-18.18S%c"), (lcd_encoder == menu_item)?'>':' ', str, type_char);
return cnt;
}