mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Support SmartAudio V1
This commit is contained in:
parent
e5d1382f59
commit
f26144db72
2 changed files with 46 additions and 11 deletions
|
@ -494,6 +494,8 @@ static void cmsMenuCountPage(displayPort_t *pDisplay)
|
|||
pageCount = (p - currentCtx.menu->entries - 1) / MAX_MENU_ITEMS(pDisplay) + 1;
|
||||
}
|
||||
|
||||
STATIC_UNIT_TESTED long cmsMenuBack(displayPort_t *pDisplay); // Forward; will be resolved after merging
|
||||
|
||||
long cmsMenuChange(displayPort_t *pDisplay, const void *ptr)
|
||||
{
|
||||
CMS_Menu *pMenu = (CMS_Menu *)ptr;
|
||||
|
@ -522,8 +524,9 @@ long cmsMenuChange(displayPort_t *pDisplay, const void *ptr)
|
|||
currentCtx.menu = pMenu;
|
||||
currentCtx.cursorRow = 0;
|
||||
|
||||
if (pMenu->onEnter)
|
||||
pMenu->onEnter();
|
||||
if (pMenu->onEnter && (pMenu->onEnter() == MENU_CHAIN_BACK)) {
|
||||
return cmsMenuBack(pDisplay);
|
||||
}
|
||||
|
||||
cmsMenuCountPage(pDisplay);
|
||||
cmsPageSelect(pDisplay, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue