mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 01:05:21 +03:00
Move CMS entries and menus from RAM to FLASH
Use a global array in cms.c to keep track of the dirty elements that need redrawing. This lets us avoid modifying the entry flags to keep track of it, so they can now be completely read only. This in turn lets us also move all the menus to the text section. This commit saves 6112 bytes of RAM in F3, so we have some room to play again without resorting to disabling features.
This commit is contained in:
parent
0131e3e066
commit
d6c75bd6f5
21 changed files with 147 additions and 140 deletions
|
@ -52,7 +52,7 @@ static long cmsx_menuRcConfirmBack(const OSD_Entry *self)
|
|||
//
|
||||
// RC preview
|
||||
//
|
||||
static OSD_Entry cmsx_menuRcEntries[] =
|
||||
static const OSD_Entry cmsx_menuRcEntries[] =
|
||||
{
|
||||
OSD_LABEL_ENTRY("-- RC PREV --"),
|
||||
|
||||
|
@ -70,7 +70,7 @@ static OSD_Entry cmsx_menuRcEntries[] =
|
|||
OSD_END_ENTRY,
|
||||
};
|
||||
|
||||
CMS_Menu cmsx_menuRcPreview = {
|
||||
static const CMS_Menu cmsx_menuRcPreview = {
|
||||
#ifdef CMS_MENU_DEBUG
|
||||
.GUARD_text = "XRCPREV",
|
||||
.GUARD_type = OME_MENU,
|
||||
|
@ -81,7 +81,7 @@ CMS_Menu cmsx_menuRcPreview = {
|
|||
.entries = cmsx_menuRcEntries
|
||||
};
|
||||
|
||||
static OSD_Entry menuMiscEntries[]=
|
||||
static const OSD_Entry menuMiscEntries[]=
|
||||
{
|
||||
OSD_LABEL_ENTRY("-- MISC --"),
|
||||
|
||||
|
@ -106,7 +106,7 @@ static OSD_Entry menuMiscEntries[]=
|
|||
OSD_END_ENTRY,
|
||||
};
|
||||
|
||||
CMS_Menu cmsx_menuMisc = {
|
||||
const CMS_Menu cmsx_menuMisc = {
|
||||
#ifdef CMS_MENU_DEBUG
|
||||
.GUARD_text = "XMISC",
|
||||
.GUARD_type = OME_MENU,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue