mirror of
https://github.com/opentx/opentx.git
synced 2025-07-19 14:25:11 +03:00
Dangerous module functions fix
This commit is contained in:
parent
54a5a34fe8
commit
0c17833ab7
1 changed files with 17 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue