diff --git a/radio/src/gui/128x64/model_special_functions.cpp b/radio/src/gui/128x64/model_special_functions.cpp index 7a50aff6d..d120965f5 100644 --- a/radio/src/gui/128x64/model_special_functions.cpp +++ b/radio/src/gui/128x64/model_special_functions.cpp @@ -68,7 +68,7 @@ void onCustomFunctionsFileSelectionMenu(const char * result) storageDirty(eeFlags); } } -#endif +#endif // CPUARM && SDCARD #if defined(PCBX7) @@ -171,7 +171,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF } POPUP_MENU_START(onCustomFunctionsMenu); } -#endif +#endif // PCBX7 for (uint8_t i=0; iactiveSwitches & ((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); -#endif +#endif //CPUARM #if defined(CPUARM) if (func == FUNC_OVERRIDE_CHANNEL && functions != g_model.customFn) { func = CFN_FUNC(cfn) = func+1; @@ -252,7 +252,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF #endif break; } -#endif +#endif // GVARS #if defined(CPUARM) else if (func == FUNC_SET_TIMER) { maxParam = MAX_TIMERS-1; @@ -260,7 +260,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF if (active) CFN_TIMER_INDEX(cfn) = checkIncDec(event, CFN_TIMER_INDEX(cfn), 0, maxParam, eeFlags); break; } -#endif +#endif // CPUARM else if (attr) { REPEAT_LAST_CURSOR_MOVE(); } @@ -294,7 +294,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF #else val_max = FUNC_RESET_PARAM_LAST; lcdDrawTextAtIndex(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, STR_VFSWRESET, CFN_PARAM(cfn), attr); -#endif +#endif // CPUARM } #if defined(OVERRIDE_CHANNEL_FUNCTION) else if (func == FUNC_OVERRIDE_CHANNEL) { @@ -304,14 +304,12 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF val_min = -LIMIT_EXT_PERCENT; val_max = +LIMIT_EXT_PERCENT; lcdDrawNumber(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, val_displayed, attr|LEFT); } -#endif +#endif // OVERRIDE_CHANNEL_FUNCTION #if defined(CPUARM) else if (func >= FUNC_SET_FAILSAFE && func <= FUNC_BIND) { val_max = NUM_MODULES-1; lcdDrawTextAtIndex(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, "\004Int.Ext.", CFN_PARAM(cfn), attr); } -#endif -#if defined(CPUARM) else if (func == FUNC_SET_TIMER) { val_max = 539*60+59; drawTimer(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, val_displayed, attr|LEFT, attr); @@ -358,10 +356,12 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF else if (func == FUNC_PLAY_VALUE) { val_max = MIXSRC_LAST_TELEM; drawSource(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, val_displayed, attr); - INCDEC_SET_FLAG(eeFlags | INCDEC_SOURCE); - INCDEC_ENABLE_CHECK(isSourceAvailable); + if (active) { + INCDEC_SET_FLAG(eeFlags | INCDEC_SOURCE); + INCDEC_ENABLE_CHECK(isSourceAvailable); + } } -#endif +#endif // CPUARM && SDCARD #if defined(CPUARM) else if (func == FUNC_VOLUME) { val_max = MIXSRC_LAST_CH; @@ -386,7 +386,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF } #else lcdDrawNumber(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, val_displayed+PROMPT_CUSTOM_BASE, attr|LEFT); -#endif +#endif // GVARS } else if (func == FUNC_PLAY_BOTH) { lcdDrawChar(MODEL_SPECIAL_FUNC_3RD_COLUMN+3*FWNUM, y, '|', attr); @@ -439,7 +439,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF #else val_max = 1; lcdDrawTextAtIndex(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, PSTR("\003-=1+=1"), val_displayed, attr); -#endif +#endif // PCBX7 break; } @@ -454,7 +454,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF val_displayed = 0; } } -#endif +#endif // GVARS else if (attr) { REPEAT_LAST_CURSOR_MOVE(); } @@ -477,7 +477,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF #else if (active) { CFN_PARAM(cfn) = CHECK_INCDEC_PARAM(event, val_displayed, val_min, val_max); -#endif +#endif // PCBX7 } break; }