[X7D] Quick & dirty fix for special functions navigation which was broken
This commit is contained in:
@@ -23,7 +23,27 @@
|
|||||||
#if defined(CPUARM)
|
#if defined(CPUARM)
|
||||||
void menuRadioSpecialFunctions(event_t event)
|
void menuRadioSpecialFunctions(event_t event)
|
||||||
{
|
{
|
||||||
|
#if defined(PCBX7D)
|
||||||
|
const CustomFunctionData * cfn = &g_eeGeneral.customFn[menuVerticalPosition];
|
||||||
|
if (!CFN_SWITCH(cfn) && menuHorizontalPosition < 0 && event==EVT_KEY_BREAK(KEY_ENTER)) {
|
||||||
|
menuHorizontalPosition = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
MENU(STR_MENUSPECIALFUNCS, menuTabGeneral, MENU_RADIO_SPECIAL_FUNCTIONS, HEADER_LINE+MAX_SPECIAL_FUNCTIONS, { HEADER_LINE_COLUMNS NAVIGATION_LINE_BY_LINE|4/*repeated*/ });
|
MENU(STR_MENUSPECIALFUNCS, menuTabGeneral, MENU_RADIO_SPECIAL_FUNCTIONS, HEADER_LINE+MAX_SPECIAL_FUNCTIONS, { HEADER_LINE_COLUMNS NAVIGATION_LINE_BY_LINE|4/*repeated*/ });
|
||||||
return menuSpecialFunctions(event, g_eeGeneral.customFn, &globalFunctionsContext);
|
|
||||||
|
#if defined(PCBX7D)
|
||||||
|
if (!CFN_SWITCH(cfn) && menuHorizontalPosition < 0) {
|
||||||
|
menuHorizontalPosition = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
menuSpecialFunctions(event, g_eeGeneral.customFn, &globalFunctionsContext);
|
||||||
|
|
||||||
|
#if defined(PCBX7D)
|
||||||
|
if (!CFN_SWITCH(cfn) && menuHorizontalPosition == 0 && s_editMode <= 0) {
|
||||||
|
menuHorizontalPosition = -1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -372,11 +372,34 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if defined(PCBX7D)
|
||||||
|
if (sub==k && menuHorizontalPosition<0 && CFN_SWITCH(cfn)) {
|
||||||
|
lcdInvertLine(i+1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void menuModelSpecialFunctions(event_t event)
|
void menuModelSpecialFunctions(event_t event)
|
||||||
{
|
{
|
||||||
MENU(STR_MENUCUSTOMFUNC, menuTabModel, MENU_MODEL_SPECIAL_FUNCTIONS, MAX_SPECIAL_FUNCTIONS+1, {0, NAVIGATION_LINE_BY_LINE|4/*repeated*/});
|
#if defined(PCBX7D)
|
||||||
return menuSpecialFunctions(event, g_model.customFn, &modelFunctionsContext);
|
const CustomFunctionData * cfn = &g_model.customFn[menuVerticalPosition];
|
||||||
|
if (!CFN_SWITCH(cfn) && menuHorizontalPosition < 0 && event==EVT_KEY_BREAK(KEY_ENTER)) {
|
||||||
|
menuHorizontalPosition = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
MENU(STR_MENUCUSTOMFUNC, menuTabModel, MENU_MODEL_SPECIAL_FUNCTIONS, HEADER_LINE+MAX_SPECIAL_FUNCTIONS, { HEADER_LINE_COLUMNS NAVIGATION_LINE_BY_LINE|4/*repeated*/ });
|
||||||
|
|
||||||
|
#if defined(PCBX7D)
|
||||||
|
if (!CFN_SWITCH(cfn) && menuHorizontalPosition < 0) {
|
||||||
|
menuHorizontalPosition = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
menuSpecialFunctions(event, g_model.customFn, &modelFunctionsContext);
|
||||||
|
|
||||||
|
#if defined(PCBX7D)
|
||||||
|
if (!CFN_SWITCH(cfn) && menuHorizontalPosition == 0 && s_editMode <= 0) {
|
||||||
|
menuHorizontalPosition = -1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user