Merge pull request #2297 from opentx/bsongis/dangerous_module_functions
Dangerous module functions fix
This commit is contained in:
+17
-1
@@ -371,7 +371,7 @@ void evalFunctions()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0 //defined(DANGEROUS_MODULE_FUNCTIONS)
|
||||
#if defined(DANGEROUS_MODULE_FUNCTIONS)
|
||||
case FUNC_RANGECHECK:
|
||||
case FUNC_BIND:
|
||||
case FUNC_MODULE_OFF:
|
||||
@@ -568,6 +568,22 @@ void evalFunctions()
|
||||
}
|
||||
else {
|
||||
functionsContext.lastFunctionTime[i] = 0;
|
||||
#if defined(DANGEROUS_MODULE_FUNCTIONS)
|
||||
if (functionsContext.activeSwitches & switch_mask)) {
|
||||
switch (CFN_FUNC(cfn)) {
|
||||
case FUNC_RANGECHECK:
|
||||
case FUNC_BIND:
|
||||
case FUNC_MODULE_OFF:
|
||||
{
|
||||
unsigned int moduleIndex = CFN_PARAM(cfn);
|
||||
if (moduleIndex < NUM_MODULES) {
|
||||
moduleFlag[moduleIndex] = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user