[stock] Around 110bytes flash saved
[all] EXIT now closes the popup on main views when a GVAR is modified
This commit is contained in:
+7
-5
@@ -155,12 +155,17 @@ void menuMainView(uint8_t event)
|
|||||||
killEvents(event);
|
killEvents(event);
|
||||||
break;
|
break;
|
||||||
case EVT_KEY_FIRST(KEY_EXIT):
|
case EVT_KEY_FIRST(KEY_EXIT):
|
||||||
if(s_timerState[0]==TMR_BEEPING) {
|
if (s_timerState[0]==TMR_BEEPING) {
|
||||||
s_timerState[0] = TMR_STOPPED;
|
s_timerState[0] = TMR_STOPPED;
|
||||||
}
|
}
|
||||||
else if (s_global_warning) {
|
else if (s_global_warning) {
|
||||||
s_global_warning = NULL;
|
s_global_warning = NULL;
|
||||||
}
|
}
|
||||||
|
#if defined(GVARS)
|
||||||
|
else if (s_gvar_timer > 0) {
|
||||||
|
s_gvar_timer = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
else if (view == e_timer2) {
|
else if (view == e_timer2) {
|
||||||
resetTimer(1);
|
resetTimer(1);
|
||||||
}
|
}
|
||||||
@@ -381,10 +386,7 @@ void menuMainView(uint8_t event)
|
|||||||
// lcd_outdezNAtt(33+11*FW, FH*6, s_timerVal_10ms[1], LEADING0, 2); // 1/100s
|
// lcd_outdezNAtt(33+11*FW, FH*6, s_timerVal_10ms[1], LEADING0, 2); // 1/100s
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s_warning) {
|
if (s_global_warning) {
|
||||||
// Nothing here
|
|
||||||
}
|
|
||||||
else if (s_global_warning) {
|
|
||||||
s_warning = s_global_warning;
|
s_warning = s_global_warning;
|
||||||
displayWarning(_event);
|
displayWarning(_event);
|
||||||
if (!s_warning) s_global_warning = NULL;
|
if (!s_warning) s_global_warning = NULL;
|
||||||
|
|||||||
@@ -228,6 +228,11 @@ void check_rotary_encoder()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void title(const pm_char * s)
|
||||||
|
{
|
||||||
|
lcd_putsAtt(0, 0, s, INVERS);
|
||||||
|
}
|
||||||
|
|
||||||
#define SCROLL_TH 64
|
#define SCROLL_TH 64
|
||||||
#define SCROLL_POT1_TH 32
|
#define SCROLL_POT1_TH 32
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -159,8 +159,8 @@ bool check_submenu_simple(uint8_t event, uint8_t maxrow);
|
|||||||
|
|
||||||
typedef void (*MenuFuncP_PROGMEM)(uint8_t event);
|
typedef void (*MenuFuncP_PROGMEM)(uint8_t event);
|
||||||
|
|
||||||
#define TITLEP(pstr) lcd_putsAtt(0,0,pstr,INVERS)
|
void title(const pm_char * s);
|
||||||
#define TITLE(str) TITLEP(str)
|
#define TITLE(str) title(str)
|
||||||
|
|
||||||
#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__; \
|
||||||
|
|||||||
+3
-3
@@ -1706,7 +1706,7 @@ enum MixFields {
|
|||||||
|
|
||||||
void menuModelMixOne(uint8_t event)
|
void menuModelMixOne(uint8_t event)
|
||||||
{
|
{
|
||||||
TITLEP(s_currCh ? STR_INSERTMIX : STR_EDITMIX);
|
TITLE(s_currCh ? STR_INSERTMIX : STR_EDITMIX);
|
||||||
MixData *md2 = mixaddress(s_currIdx) ;
|
MixData *md2 = mixaddress(s_currIdx) ;
|
||||||
putsChn(lcdLastPos+1*FW,0,md2->destCh+1,0);
|
putsChn(lcdLastPos+1*FW,0,md2->destCh+1,0);
|
||||||
|
|
||||||
@@ -1856,7 +1856,7 @@ void menuModelExpoMix(uint8_t expo, uint8_t _event)
|
|||||||
event -= KEY_EXIT;
|
event -= KEY_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
TITLEP(expo ? STR_MENUDREXPO : STR_MIXER);
|
TITLE(expo ? STR_MENUDREXPO : STR_MIXER);
|
||||||
lcd_outdezAtt(lcdLastPos+2*FW+FW/2, 0, getExpoMixCount(expo));
|
lcd_outdezAtt(lcdLastPos+2*FW+FW/2, 0, getExpoMixCount(expo));
|
||||||
lcd_puts(lcdLastPos, 0, expo ? STR_MAX(MAX_EXPOS) : STR_MAX(MAX_MIXERS));
|
lcd_puts(lcdLastPos, 0, expo ? STR_MAX(MAX_EXPOS) : STR_MAX(MAX_MIXERS));
|
||||||
SIMPLE_MENU_NOTITLE(menuTabModel, expo ? e_ExposAll : e_MixAll, s_maxLines);
|
SIMPLE_MENU_NOTITLE(menuTabModel, expo ? e_ExposAll : e_MixAll, s_maxLines);
|
||||||
@@ -2396,7 +2396,7 @@ enum CustomSwitchFields {
|
|||||||
#define CSW_2ND_COLUMN (9*FW)
|
#define CSW_2ND_COLUMN (9*FW)
|
||||||
void menuModelCustomSwitchOne(uint8_t event)
|
void menuModelCustomSwitchOne(uint8_t event)
|
||||||
{
|
{
|
||||||
TITLEP(STR_MENUCUSTOMSWITCH);
|
TITLE(STR_MENUCUSTOMSWITCH);
|
||||||
CustomSwData * cs = cswaddress(s_currIdx);
|
CustomSwData * cs = cswaddress(s_currIdx);
|
||||||
uint8_t sw = DSW_SW1+s_currIdx;
|
uint8_t sw = DSW_SW1+s_currIdx;
|
||||||
putsSwitches(14*FW, 0, sw, (getSwitch(sw, 0) ? BOLD : 0));
|
putsSwitches(14*FW, 0, sw, (getSwitch(sw, 0) ? BOLD : 0));
|
||||||
|
|||||||
Reference in New Issue
Block a user