1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 17:25:20 +03:00

Drastically reduce the CMS RAM usage.

Previously the runtime page state was mixed with the page configuration.

This resolves this by:
a) making the configuration entries constant so they do not need to be
in RAM.
b) Maintaining page state independently.
This commit is contained in:
Dominic Clifton 2019-02-16 16:48:42 +01:00
parent fefa2a83e4
commit 78f38daa4f
14 changed files with 93 additions and 85 deletions

View file

@ -78,7 +78,7 @@ static long cmsx_InfoInit(void)
return 0;
}
static OSD_Entry menuInfoEntries[] = {
static const OSD_Entry menuInfoEntries[] = {
{ "--- INFO ---", OME_Label, NULL, NULL, 0 },
{ "FWID", OME_String, NULL, BETAFLIGHT_IDENTIFIER, 0 },
{ "FWVER", OME_String, NULL, FC_VERSION_STRING, 0 },
@ -100,7 +100,7 @@ static CMS_Menu menuInfo = {
// Features
static OSD_Entry menuFeaturesEntries[] =
static const OSD_Entry menuFeaturesEntries[] =
{
{"--- FEATURES ---", OME_Label, NULL, NULL, 0},
@ -141,7 +141,7 @@ static CMS_Menu menuFeatures = {
// Main
static OSD_Entry menuMainEntries[] =
static const OSD_Entry menuMainEntries[] =
{
{"-- MAIN --", OME_Label, NULL, NULL, 0},