Trims display parameter added to Companion
This commit is contained in:
@@ -994,6 +994,7 @@ class ModelData {
|
|||||||
bool noGlobalFunctions;
|
bool noGlobalFunctions;
|
||||||
bool thrTrim; // Enable Throttle Trim
|
bool thrTrim; // Enable Throttle Trim
|
||||||
int trimInc; // Trim Increments
|
int trimInc; // Trim Increments
|
||||||
|
unsigned int trimsDisplay;
|
||||||
bool disableThrottleWarning;
|
bool disableThrottleWarning;
|
||||||
|
|
||||||
unsigned int beepANACenter; // 1<<0->A1.. 1<<6->A7
|
unsigned int beepANACenter; // 1<<0->A1.. 1<<6->A7
|
||||||
|
|||||||
@@ -2794,9 +2794,13 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
|
|||||||
|
|
||||||
internalField.Append(new BoolField<1>(modelData.thrTrim));
|
internalField.Append(new BoolField<1>(modelData.thrTrim));
|
||||||
|
|
||||||
if (IS_TARANIS(board) || (IS_ARM(board) && version >= 216)) {
|
if (IS_ARM(board) && version >= 217) {
|
||||||
internalField.Append(new BoolField<1>(modelData.noGlobalFunctions));
|
internalField.Append(new BoolField<1>(modelData.noGlobalFunctions));
|
||||||
internalField.Append(new SpareBitsField<3>());
|
internalField.Append(new UnsignedField<2>(modelData.trimsDisplay));
|
||||||
|
internalField.Append(new SpareBitsField<1>());
|
||||||
|
}
|
||||||
|
else if (IS_TARANIS(board) || (IS_ARM(board) && version >= 216)) {
|
||||||
|
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")));
|
internalField.Append(new ConversionField< SignedField<4> >(modelData.moduleData[0].channelsCount, &channelsConversionTable, "Channels number", ::QObject::tr("OpenTX doesn't allow this number of channels")));
|
||||||
|
|||||||
@@ -520,6 +520,15 @@ SetupPanel::SetupPanel(QWidget *parent, ModelData & model, GeneralSettings & gen
|
|||||||
ui->potWarningMode->hide();
|
ui->potWarningMode->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IS_ARM(board)) {
|
||||||
|
ui->trimsDisplay->setField(model.trimsDisplay, this);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ui->labelTrimsDisplay->hide();
|
||||||
|
ui->trimsDisplay->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
disableMouseScrolling();
|
disableMouseScrolling();
|
||||||
|
|
||||||
lock = false;
|
lock = false;
|
||||||
|
|||||||
@@ -66,6 +66,36 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="5" column="1">
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QCheckBox" name="extendedTrims">
|
||||||
|
<property name="layoutDirection">
|
||||||
|
<enum>Qt::LeftToRight</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Extended Trims</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3">
|
||||||
|
<widget class="QCheckBox" name="displayText">
|
||||||
|
<property name="layoutDirection">
|
||||||
|
<enum>Qt::LeftToRight</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Display Checklist</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QCheckBox" name="extendedLimits">
|
||||||
|
<property name="layoutDirection">
|
||||||
|
<enum>Qt::LeftToRight</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Extended Limits</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="3">
|
<item row="0" column="3">
|
||||||
<widget class="QCheckBox" name="throttleReverse">
|
<widget class="QCheckBox" name="throttleReverse">
|
||||||
<property name="whatsThis">
|
<property name="whatsThis">
|
||||||
@@ -82,16 +112,6 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QCheckBox" name="extendedLimits">
|
|
||||||
<property name="layoutDirection">
|
|
||||||
<enum>Qt::LeftToRight</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Extended Limits</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QComboBox" name="throttleSource">
|
<widget class="QComboBox" name="throttleSource">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -102,16 +122,6 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QCheckBox" name="extendedTrims">
|
|
||||||
<property name="layoutDirection">
|
|
||||||
<enum>Qt::LeftToRight</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Extended Trims</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QCheckBox" name="throttleTrim">
|
<widget class="QCheckBox" name="throttleTrim">
|
||||||
<property name="layoutDirection">
|
<property name="layoutDirection">
|
||||||
@@ -180,14 +190,29 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="3">
|
<item row="2" column="0">
|
||||||
<widget class="QCheckBox" name="displayText">
|
<widget class="AutoComboBox" name="trimsDisplay">
|
||||||
<property name="layoutDirection">
|
<property name="sizePolicy">
|
||||||
<enum>Qt::LeftToRight</enum>
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
</property>
|
<horstretch>0</horstretch>
|
||||||
<property name="text">
|
<verstretch>0</verstretch>
|
||||||
<string>Display Checklist</string>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Never</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>On change</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Always</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@@ -226,6 +251,22 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="labelTrimsDisplay">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>50</weight>
|
||||||
|
<bold>false</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Trims Display</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="4" column="1">
|
||||||
@@ -548,6 +589,13 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>AutoComboBox</class>
|
||||||
|
<extends>QComboBox</extends>
|
||||||
|
<header>autocombobox.h</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
Reference in New Issue
Block a user