Companion part
This commit is contained in:
@@ -775,6 +775,7 @@ class FrSkyData {
|
||||
bool mAhPersistent;
|
||||
unsigned int storedMah;
|
||||
int fasOffset;
|
||||
bool ignoreSensorIds;
|
||||
|
||||
void clear();
|
||||
};
|
||||
|
||||
@@ -2957,7 +2957,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
|
||||
if (IS_ARM(board) && version >= 217) {
|
||||
internalField.Append(new BoolField<1>(modelData.noGlobalFunctions));
|
||||
internalField.Append(new UnsignedField<2>(modelData.trimsDisplay));
|
||||
internalField.Append(new SpareBitsField<1>());
|
||||
internalField.Append(new BoolField<1>(modelData.frsky.ignoreSensorIds));
|
||||
}
|
||||
else if (IS_TARANIS(board) || (IS_ARM(board) && version >= 216)) {
|
||||
internalField.Append(new SpareBitsField<4>());
|
||||
|
||||
@@ -728,6 +728,7 @@ TelemetryPanel::TelemetryPanel(QWidget *parent, ModelData & model, GeneralSettin
|
||||
analogs[1] = new TelemetryAnalog(this, model.frsky.channels[1], model, generalSettings, firmware);
|
||||
ui->A2Layout->addWidget(analogs[1]);
|
||||
connect(analogs[1], SIGNAL(modified()), this, SLOT(onAnalogModified()));
|
||||
ui->ignoreSensorIds->hide();
|
||||
}
|
||||
|
||||
if (IS_TARANIS(firmware->getBoard())) {
|
||||
@@ -870,6 +871,10 @@ void TelemetryPanel::setup()
|
||||
ui->variousGB->show();
|
||||
}
|
||||
|
||||
if (IS_ARM(firmware->getBoard())) {
|
||||
ui->ignoreSensorIds->setChecked(model->frsky.ignoreSensorIds);
|
||||
}
|
||||
|
||||
if (!(firmware->getCapability(HasMahPersistent))) {
|
||||
ui->mahCount_label->hide();
|
||||
ui->mahCount_SB->hide();
|
||||
@@ -1036,6 +1041,12 @@ void TelemetryPanel::on_mahCount_SB_editingFinished()
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void TelemetryPanel::on_ignoreSensorIds_toggled(bool checked)
|
||||
{
|
||||
model->frsky.ignoreSensorIds = checked;
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void TelemetryPanel::on_mahCount_ChkB_toggled(bool checked)
|
||||
{
|
||||
model->frsky.mAhPersistent = checked;
|
||||
|
||||
@@ -132,6 +132,7 @@ class TelemetryPanel : public ModelPanel
|
||||
void on_fasOffset_DSB_editingFinished();
|
||||
void on_mahCount_SB_editingFinished();
|
||||
void on_mahCount_ChkB_toggled(bool checked);
|
||||
void on_ignoreSensorIds_toggled(bool checked);
|
||||
|
||||
private:
|
||||
Ui::Telemetry *ui;
|
||||
|
||||
@@ -896,7 +896,7 @@
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="sensorsLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
@@ -909,6 +909,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="ignoreSensorIds">
|
||||
<property name="text">
|
||||
<string>Disable multi sensor handling</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user