Set all custom failsafe channels at once (#5834)
* added setCustomFailsafe() * failsafe setup: set all custom channels with ENTER long press implements #5820 * added “outputs -> failsafe” menu item on horus * change “Trims >> Subtrims” to “Trims => Subtrims” * use translated string for “Outputs => Failsafe” * fixed entered TR_TRIMS2OFFSETS and TR_OUTPUTS2FAILSAFE When using ZCHARs in Horus texts, there are some artefacts when highlighted. * added “outputs -> failsafe” menu item on taranis 212x64 LCD * added “outputs -> failsafe” menu item on taranis 128x64 LCD * fixed indentation
This commit is contained in:
committed by
Bertrand Songis
parent
4f8f00c4e2
commit
2ad0db2d80
+1
-11
@@ -379,17 +379,7 @@ void evalFunctions()
|
||||
|
||||
case FUNC_SET_FAILSAFE:
|
||||
{
|
||||
unsigned int moduleIndex = CFN_PARAM(cfn);
|
||||
if (moduleIndex < NUM_MODULES) {
|
||||
for (int ch=0; ch<MAX_OUTPUT_CHANNELS; ch++) {
|
||||
if (ch < g_model.moduleData[moduleIndex].channelsStart || ch >= NUM_CHANNELS(moduleIndex) + g_model.moduleData[moduleIndex].channelsStart) {
|
||||
g_model.moduleData[moduleIndex].failsafeChannels[ch] = 0;
|
||||
}
|
||||
else if (g_model.moduleData[moduleIndex].failsafeChannels[ch] < FAILSAFE_CHANNEL_HOLD) {
|
||||
g_model.moduleData[moduleIndex].failsafeChannels[ch] = channelOutputs[ch];
|
||||
}
|
||||
}
|
||||
}
|
||||
setCustomFailsafe(CFN_PARAM(cfn));
|
||||
}
|
||||
|
||||
#if defined(DANGEROUS_MODULE_FUNCTIONS)
|
||||
|
||||
Reference in New Issue
Block a user