Merge pull request #2290 from opentx/bsongis/issue_2266_set_failsafe_custom_function

Fixes #2266
This commit is contained in:
Bertrand Songis
2015-06-29 22:57:23 +02:00
18 changed files with 35 additions and 20 deletions
-1
View File
@@ -234,7 +234,6 @@ bool isAssignableFunctionAvailable(int function)
#if !defined(DANGEROUS_MODULE_FUNCTIONS)
case FUNC_RANGECHECK:
case FUNC_BIND:
case FUNC_MODULE_OFF:
#endif
case FUNC_PLAY_SCRIPT:
case FUNC_RESERVE5:
@@ -192,8 +192,8 @@ void menuCustomFunctions(uint8_t event, CustomFunctionData * functions, CustomFu
lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr|LEFT);
}
#endif
#if defined(DANGEROUS_MODULE_FUNCTIONS)
else if (func >= FUNC_RANGECHECK && func <= FUNC_MODULE_OFF) {
#if defined(CPUARM)
else if (func >= FUNC_SET_FAILSAFE && func <= FUNC_BIND) {
val_max = NUM_MODULES-1;
lcd_putsiAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, "\004Int.Ext.", CFN_PARAM(cfn), attr);
}
-1
View File
@@ -331,7 +331,6 @@ bool isAssignableFunctionAvailable(int function)
#if !defined(DANGEROUS_MODULE_FUNCTIONS)
case FUNC_RANGECHECK:
case FUNC_BIND:
case FUNC_MODULE_OFF:
#endif
#if !defined(LUA)
case FUNC_PLAY_SCRIPT:
@@ -230,12 +230,10 @@ void menuCustomFunctions(uint8_t event, CustomFunctionData * functions, CustomFu
lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr|LEFT);
}
#endif
#if defined(DANGEROUS_MODULE_FUNCTIONS)
else if (func >= FUNC_RANGECHECK && func <= FUNC_MODULE_OFF) {
else if (func >= FUNC_SET_FAILSAFE && func <= FUNC_BIND) {
val_max = NUM_MODULES-1;
lcd_putsiAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, "\004Int.Ext.", CFN_PARAM(cfn), attr);
}
#endif
else if (func == FUNC_SET_TIMER) {
val_max = 59*60+59;
putsTimer(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr|LEFT, attr);