Add a new parameter "Use Global Functions" for model where they are not

needed
This commit is contained in:
bsongis
2014-11-04 07:25:23 +01:00
parent 13772429f9
commit aa28af6235
5 changed files with 23 additions and 7 deletions
+1
View File
@@ -887,6 +887,7 @@ class ModelData {
bool used;
char name[12+1];
TimerData timers[C9X_MAX_TIMERS];
bool noGlobalFunctions;
bool thrTrim; // Enable Throttle Trim
int trimInc; // Trim Increments
bool disableThrottleWarning;
@@ -2630,10 +2630,13 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
internalField.Append(new BoolField<1>(modelData.thrTrim));
if (IS_TARANIS(board) || (IS_ARM(board) && version >= 216))
if (IS_TARANIS(board) || (IS_ARM(board) && version >= 216)) {
internalField.Append(new BoolField<1>(modelData.noGlobalFunctions));
internalField.Append(new SpareBitsField<4>());
else
}
else {
internalField.Append(new ConversionField< SignedField<4> >(modelData.moduleData[0].channelsCount, &channelsConversionTable, "Channels number", ::QObject::tr("OpenTX doesn't allow this number of channels")));
}
if (version >= 216)
internalField.Append(new SignedField<3>(modelData.trimInc));