Skip to content

Commit

Permalink
Fixes #2424 - ReplaceCHx should not be present in global functions
Browse files Browse the repository at this point in the history
  • Loading branch information
bsongis committed Jul 6, 2015
1 parent 5b567fc commit 8723c11
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions radio/src/gui/Taranis/menu_model_custom_functions.cpp
Expand Up @@ -149,16 +149,16 @@ void menuCustomFunctions(uint8_t event, CustomFunctionData * functions, CustomFu
case 0:
putsSwitches(MODEL_CUSTOM_FUNC_1ST_COLUMN, y, CFN_SWITCH(cfn), attr | ((functionsContext.activeSwitches & ((MASK_CFN_TYPE)1 << k)) ? BOLD : 0));
if (active || AUTOSWITCH_ENTER_LONG()) CHECK_INCDEC_SWITCH(event, CFN_SWITCH(cfn), SWSRC_FIRST, SWSRC_LAST, eeFlags, isSwitchAvailableInCustomFunctions);
if (func == FUNC_OVERRIDE_CHANNEL && functions != g_model.customFn) {
func = CFN_FUNC(cfn) = func+1;
}
break;

case 1:
if (CFN_SWITCH(cfn)) {
if (active && func == FUNC_OVERRIDE_CHANNEL) {
func = CFN_FUNC(cfn) = checkIncDec(event, CFN_FUNC(cfn), 0, FUNC_MAX-1, eeFlags, isAssignableFunctionAvailable);
}
lcd_putsiAtt(MODEL_CUSTOM_FUNC_2ND_COLUMN, y, STR_VFSWFUNC, func, attr);
if (active) {
CFN_FUNC(cfn) = checkIncDec(event, CFN_FUNC(cfn), 0, FUNC_MAX-1, eeFlags, isAssignableFunctionAvailable);
func = CFN_FUNC(cfn) = checkIncDec(event, CFN_FUNC(cfn), 0, FUNC_MAX-1, eeFlags, isAssignableFunctionAvailable);
if (checkIncDec_Ret) CFN_RESET(cfn);
}
}
Expand Down

0 comments on commit 8723c11

Please sign in to comment.