option added for menus to show "JUSTONCE"
This commit is contained in:
parent
9add0367fe
commit
13f5444745
|
@ -180,6 +180,7 @@ struct MENU {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MENU_TIMEOUT (1<<0)
|
#define MENU_TIMEOUT (1<<0)
|
||||||
|
#define MENU_JUSTONCE (1<<1)
|
||||||
extern uint8_t menuflags;
|
extern uint8_t menuflags;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,10 @@ void handleMenu(const struct MENU *the_menu) {
|
||||||
case BTN_RIGHT:
|
case BTN_RIGHT:
|
||||||
if (the_menu->entries[menuselection].callback!=NULL)
|
if (the_menu->entries[menuselection].callback!=NULL)
|
||||||
the_menu->entries[menuselection].callback();
|
the_menu->entries[menuselection].callback();
|
||||||
|
|
||||||
|
if (menuflags&MENU_JUSTONCE)
|
||||||
|
return;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case BTN_ENTER:
|
case BTN_ENTER:
|
||||||
lcdClear();
|
lcdClear();
|
||||||
|
@ -77,6 +81,10 @@ void handleMenu(const struct MENU *the_menu) {
|
||||||
if (the_menu->entries[menuselection].callback!=NULL)
|
if (the_menu->entries[menuselection].callback!=NULL)
|
||||||
the_menu->entries[menuselection].callback();
|
the_menu->entries[menuselection].callback();
|
||||||
lcdRefresh();
|
lcdRefresh();
|
||||||
|
|
||||||
|
if (menuflags&MENU_JUSTONCE)
|
||||||
|
return;
|
||||||
|
|
||||||
getInputWait();
|
getInputWait();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue