ui/menu.c: Simplify code; move name printing into main switch statement.
This saves a few bytes of flash.
This commit is contained in:
committed by
Krzysiek Egzmont
parent
fbdaf6631d
commit
429cffc0bc
12
ui/menu.c
12
ui/menu.c
@@ -649,6 +649,8 @@ void UI_DisplayMenu(void)
|
||||
UI_PrintString(String, menu_item_x1, menu_item_x2, 4, 8);
|
||||
}
|
||||
|
||||
SETTINGS_FetchChannelName(String, gSubMenuSelection);
|
||||
UI_PrintString(String[0] ? String : "--", menu_item_x1, menu_item_x2, 2, 8);
|
||||
already_printed = true;
|
||||
break;
|
||||
}
|
||||
@@ -929,16 +931,6 @@ void UI_DisplayMenu(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_MEM_CH ||
|
||||
UI_MENU_GetCurrentMenuId() == MENU_DEL_CH ||
|
||||
UI_MENU_GetCurrentMenuId() == MENU_1_CALL)
|
||||
{ // display the channel name
|
||||
char s[11];
|
||||
SETTINGS_FetchChannelName(s, gSubMenuSelection);
|
||||
char *pPrintStr = s[0] ? s : "--";
|
||||
UI_PrintString(pPrintStr, menu_item_x1, menu_item_x2, 2, 8);
|
||||
}
|
||||
|
||||
if ((UI_MENU_GetCurrentMenuId() == MENU_R_CTCS || UI_MENU_GetCurrentMenuId() == MENU_R_DCS) && gCssBackgroundScan)
|
||||
UI_PrintString("SCAN", menu_item_x1, menu_item_x2, 4, 8);
|
||||
|
||||
|
Reference in New Issue
Block a user