Merge pull request #1798 from DRracer/MK3

limit printed menu text to max 18 characters
This commit is contained in:
Marek Běl 2019-05-06 12:38:54 +00:00 committed by GitHub
commit 5beb337c56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;
}