2bytes flash saved :)
This commit is contained in:
@@ -493,7 +493,7 @@ void menuProcTrainer(uint8_t event)
|
|||||||
uint8_t y;
|
uint8_t y;
|
||||||
bool slave = SLAVE_MODE;
|
bool slave = SLAVE_MODE;
|
||||||
|
|
||||||
MENU(STR_MENUTRAINER, menuTabDiag, e_Trainer, slave ? 0 : 7, {0, 2, 2, 2, 2, 0/*, 0*/});
|
MENU(STR_MENUTRAINER, menuTabDiag, e_Trainer, slave ? 1 : 7, {0, 2, 2, 2, 2, 0/*, 0*/});
|
||||||
|
|
||||||
if (slave) { // i am the slave
|
if (slave) { // i am the slave
|
||||||
lcd_puts(7*FW, 3*FH, STR_SLAVE);
|
lcd_puts(7*FW, 3*FH, STR_SLAVE);
|
||||||
|
|||||||
+4
-4
@@ -162,11 +162,11 @@ typedef void (*MenuFuncP_PROGMEM)(uint8_t event);
|
|||||||
|
|
||||||
#define MENU(title, tab, menu, lines_count, ...) \
|
#define MENU(title, tab, menu, lines_count, ...) \
|
||||||
static const pm_uint8_t mstate_tab[] PROGMEM = __VA_ARGS__; \
|
static const pm_uint8_t mstate_tab[] PROGMEM = __VA_ARGS__; \
|
||||||
if (!check(event,menu,tab,DIM(tab),mstate_tab,lines_count ? DIM(mstate_tab)-1 : 0,lines_count-1)) return; \
|
if (!check(event,menu,tab,DIM(tab),mstate_tab,DIM(mstate_tab)-1,(lines_count)-1)) return; \
|
||||||
TITLE(title)
|
TITLE(title)
|
||||||
|
|
||||||
#define SIMPLE_MENU_NOTITLE(tab, menu, lines_count) \
|
#define SIMPLE_MENU_NOTITLE(tab, menu, lines_count) \
|
||||||
if (!check_simple(event,menu,tab,DIM(tab),lines_count-1)) return;
|
if (!check_simple(event,menu,tab,DIM(tab),(lines_count)-1)) return;
|
||||||
|
|
||||||
#define SIMPLE_MENU(title, tab, menu, lines_count) \
|
#define SIMPLE_MENU(title, tab, menu, lines_count) \
|
||||||
SIMPLE_MENU_NOTITLE(tab, menu, lines_count); \
|
SIMPLE_MENU_NOTITLE(tab, menu, lines_count); \
|
||||||
@@ -174,11 +174,11 @@ TITLE(title)
|
|||||||
|
|
||||||
#define SUBMENU(title, lines_count, ...) \
|
#define SUBMENU(title, lines_count, ...) \
|
||||||
static const pm_uint8_t mstate_tab[] PROGMEM = __VA_ARGS__; \
|
static const pm_uint8_t mstate_tab[] PROGMEM = __VA_ARGS__; \
|
||||||
if (!check(event,0,NULL,0,mstate_tab,DIM(mstate_tab)-1,lines_count-1)) return; \
|
if (!check(event,0,NULL,0,mstate_tab,DIM(mstate_tab)-1,(lines_count)-1)) return; \
|
||||||
TITLE(title)
|
TITLE(title)
|
||||||
|
|
||||||
#define SIMPLE_SUBMENU_NOTITLE(lines_count) \
|
#define SIMPLE_SUBMENU_NOTITLE(lines_count) \
|
||||||
if (!check_submenu_simple(event,lines_count-1)) return;
|
if (!check_submenu_simple(event,(lines_count)-1)) return;
|
||||||
|
|
||||||
#define SIMPLE_SUBMENU(title, lines_count) \
|
#define SIMPLE_SUBMENU(title, lines_count) \
|
||||||
SIMPLE_SUBMENU_NOTITLE(lines_count); \
|
SIMPLE_SUBMENU_NOTITLE(lines_count); \
|
||||||
|
|||||||
Reference in New Issue
Block a user