chore(bw): cleanup and consolidate navigation code (#5896)

Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
This commit is contained in:
philmoz
2025-03-19 11:01:16 +10:00
committed by GitHub
co-authored by philmoz
parent 6973f07e07
commit 62a935bf84
19 changed files with 132 additions and 208 deletions
+5 -5
View File
@@ -471,22 +471,22 @@ void menuMainView(event_t event)
LOAD_MODEL_BITMAP();
break;
case EVT_KEY_LONG(KEY_ENTER):
case EVT_KEY_CONTEXT_MENU:
if (modelHasNotes()) {
POPUP_MENU_ADD_ITEM(STR_VIEW_NOTES);
}
POPUP_MENU_START(onMainViewMenu, 3, STR_RESET_SUBMENU, STR_STATISTICS, STR_ABOUT_US);
break;
case EVT_KEY_BREAK(KEY_MENU):
case EVT_KEY_MODEL_MENU:
pushMenu(menuModelSelect);
break;
case EVT_KEY_LONG(KEY_MENU):
case EVT_KEY_GENERAL_MENU:
pushMenu(menuTabGeneral[0].menuFunc);
break;
case EVT_KEY_BREAK(KEY_PAGEDN):
case EVT_KEY_NEXT_VIEW:
storageDirty(EE_MODEL);
g_model.view += 1;
if (g_model.view >= VIEW_COUNT) {
@@ -495,7 +495,7 @@ void menuMainView(event_t event)
}
break;
case EVT_KEY_BREAK(KEY_PAGEUP):
case EVT_KEY_TELEMETRY:
chainMenu(menuViewTelemetry);
break;