UI: Fixed (null) menu entry on targets without RTC

This commit is contained in:
Federico Amedeo Izzo 2021-01-29 23:07:39 +01:00
parent 12d58139e4
commit f083a77001
2 changed files with 9 additions and 4 deletions

View File

@ -121,8 +121,8 @@ typedef struct ui_state_t
extern layout_t layout;
extern settings_t settings;
extern const char *menu_items[6];
extern const char *settings_items[2];
extern const char *menu_items[];
extern const char *settings_items[];
extern const char *display_items[];
extern const uint8_t menu_num;
extern const uint8_t settings_num;

View File

@ -109,13 +109,18 @@ const char *menu_items[6] =
"Settings"
};
#ifdef HAS_RTC
const char *settings_items[2] =
{
#ifdef HAS_RTC
"Time & Date",
#endif
"Display"
};
#else
const char *settings_items[1] =
{
"Display"
};
#endif
#ifdef SCREEN_CONTRAST
const char *display_items[2] =