Review handling is global function detection.

Fixes !sensor been selectable in global scripts

Thanks to @Max for his help
This commit is contained in:
3djc
2017-06-09 09:47:34 +02:00
parent 2e4775b19a
commit bae44d2812
4 changed files with 10 additions and 7 deletions
@@ -182,7 +182,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
switch (j) {
case ITEM_CUSTOM_FUNCTIONS_SWITCH:
drawSwitch(MODEL_SPECIAL_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, functionsContext == &globalFunctionsContext ? SWSRC_TELEMETRY_STREAMING : SWSRC_LAST, eeFlags, isSwitchAvailableInCustomFunctions);
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;
}