This commit is contained in:
bsongis
2015-07-04 14:17:09 +02:00
parent 6ca949d033
commit 4c4d3bc24d
4 changed files with 43 additions and 39 deletions
+2 -2
View File
@@ -327,8 +327,8 @@ extern uint8_t s_warning_info_flags;
#define NAVIGATION_MENUS
#define MENU_ADD_ITEM(s) do { s_menu_offset_type = MENU_OFFSET_INTERNAL; if (s_menu_count < MENU_MAX_LINES) s_menu[s_menu_count++] = s; } while (0)
#define MENU_MAX_LINES 12
#define MENU_MAX_DISPLAY_LINES 6
#define MENU_MAX_LINES 12
#define MENU_MAX_DISPLAY_LINES 6
#define MENU_ADD_SD_ITEM(s) MENU_ADD_ITEM(s)
#define MENU_LINE_LENGTH (LEN_MODEL_NAME+12)
extern const char *s_menu[MENU_MAX_LINES];
+1 -1
View File
@@ -128,7 +128,7 @@ const char * displayMenu(uint8_t event)
{
const char * result = NULL;
uint8_t display_count = min<uint8_t>(s_menu_count, MENU_MAX_DISPLAY_LINES);
uint8_t display_count = min<unsigned int>(s_menu_count, MENU_MAX_DISPLAY_LINES);
uint8_t y = (display_count >= 5 ? MENU_Y - FH - 1 : MENU_Y);
drawFilledRect(MENU_X, y, MENU_W, display_count * (FH+1) + 2, SOLID, ERASE);
lcd_rect(MENU_X, y, MENU_W, display_count * (FH+1) + 2);