mirror of
https://github.com/opentx/opentx.git
synced 2025-07-21 07:15:12 +03:00
popMenu is always called without argument
This commit is contained in:
parent
ac982ef991
commit
ec2f6064f4
2 changed files with 7 additions and 8 deletions
|
@ -195,7 +195,7 @@ bool check(uint8_t event, uint8_t curr, MenuFuncP *menuTab, uint8_t menuTabSize,
|
|||
break;
|
||||
case EVT_KEY_LONG(KEY_EXIT):
|
||||
s_editMode = false;
|
||||
popMenu(false);
|
||||
popMenu();
|
||||
break;
|
||||
case EVT_KEY_BREAK(KEY_EXIT):
|
||||
if(s_editMode) {
|
||||
|
@ -264,10 +264,10 @@ uint8_t g_menuStackPtr = 0;
|
|||
uint8_t m_posVert;
|
||||
uint8_t m_posHorz;
|
||||
|
||||
void popMenu(bool uppermost)
|
||||
void popMenu()
|
||||
{
|
||||
if (g_menuStackPtr>0) {
|
||||
g_menuStackPtr = uppermost ? 0 : g_menuStackPtr-1;
|
||||
g_menuStackPtr = g_menuStackPtr-1;
|
||||
beepKey();
|
||||
m_posHorz = g_menuPos[g_menuStackPtr] & 0x0F;
|
||||
m_posVert = g_menuPos[g_menuStackPtr] >> 4;
|
||||
|
|
|
@ -60,14 +60,13 @@ extern uint8_t g_menuStackPtr;
|
|||
void chainMenu(MenuFuncP newMenu);
|
||||
/// goto given Menu, store current menu in menuStack
|
||||
void pushMenu(MenuFuncP newMenu);
|
||||
/// return to last menu in menustack
|
||||
void popMenu();
|
||||
///deliver address of last menu which was popped from
|
||||
inline MenuFuncP lastPopMenu()
|
||||
{
|
||||
return g_menuStack[g_menuStackPtr+1];
|
||||
}
|
||||
/// return to last menu in menustack
|
||||
/// if uppermost is set true, thenmenu return to uppermost menu in menustack
|
||||
void popMenu(bool uppermost=false);
|
||||
|
||||
void menuMainView(uint8_t event);
|
||||
void menuProcSetup(uint8_t event);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue