Companion Vario Sources were not in line with the firmware
This commit is contained in:
@@ -589,24 +589,15 @@ void TelemetryPanel::setup()
|
||||
ui->varioLimitMin_DSB->setValue(model.frsky.varioMin-10);
|
||||
ui->varioLimitMax_DSB->setValue(model.frsky.varioMax+10);
|
||||
ui->varioLimitCenterMax_DSB->setValue((model.frsky.varioCenterMax/10.0)+0.5);
|
||||
ui->varioSourceCB->setCurrentIndex(model.frsky.varioSource);
|
||||
if (model.frsky.varioCenterMin==-16) {
|
||||
ui->varioLimitMinOff_ChkB->setChecked(true);
|
||||
ui->varioLimitCenterMin_DSB->setValue(-2.0);
|
||||
ui->varioLimitCenterMin_DSB->setDisabled(true);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ui->varioLimitMinOff_ChkB->setChecked(false);
|
||||
ui->varioLimitCenterMin_DSB->setValue((model.frsky.varioCenterMin/10.0)-0.5);
|
||||
}
|
||||
int mask=1;
|
||||
for (int i=0; i< ui->varioSourceCB->count(); i++) {
|
||||
if (!(varioCap&mask)) {
|
||||
QModelIndex index = ui->varioSourceCB->model()->index(i, 0);
|
||||
QVariant v(0);
|
||||
ui->varioSourceCB->model()->setData(index, v, Qt::UserRole - 1);
|
||||
}
|
||||
mask <<=1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(firmware->getCapability(HasAltitudeSel)||firmware->getCapability(HasVario))) {
|
||||
@@ -668,10 +659,27 @@ void TelemetryPanel::setup()
|
||||
|
||||
populateVoltsSource();
|
||||
populateCurrentSource();
|
||||
populateVarioSource();
|
||||
|
||||
lock = false;
|
||||
}
|
||||
|
||||
void TelemetryPanel::populateVarioSource()
|
||||
{
|
||||
QUnsignedAutoComboBox * cb = ui->varioSourceCB;
|
||||
cb->setField(&model.frsky.varioSource, this);
|
||||
if (!IS_TARANIS(firmware->getBoard())) {
|
||||
cb->addItem(tr("Alti"), TELEMETRY_VARIO_SOURCE_ALTI);
|
||||
cb->addItem(tr("Alti+"), TELEMETRY_VARIO_SOURCE_ALTI_PLUS);
|
||||
}
|
||||
cb->addItem(tr("VSpeed"), TELEMETRY_VARIO_SOURCE_VSPEED);
|
||||
cb->addItem(tr("A1"), TELEMETRY_VARIO_SOURCE_A1);
|
||||
cb->addItem(tr("A2"), TELEMETRY_VARIO_SOURCE_A2);
|
||||
if (IS_TARANIS(firmware->getBoard())) {
|
||||
cb->addItem(tr("dTE"), TELEMETRY_VARIO_SOURCE_DTE);
|
||||
}
|
||||
}
|
||||
|
||||
void TelemetryPanel::populateVoltsSource()
|
||||
{
|
||||
QUnsignedAutoComboBox * cb = ui->frskyVoltCB;
|
||||
@@ -762,12 +770,6 @@ void TelemetryPanel::on_AltitudeToolbar_ChkB_toggled(bool checked)
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void TelemetryPanel::on_varioSourceCB_currentIndexChanged(int index)
|
||||
{
|
||||
model.frsky.varioSource = index;
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void TelemetryPanel::on_varioLimitMin_DSB_editingFinished()
|
||||
{
|
||||
model.frsky.varioMin = round(ui->varioLimitMin_DSB->value()+10);
|
||||
|
||||
@@ -95,7 +95,6 @@ class TelemetryPanel : public ModelPanel
|
||||
void on_rxbattAlarm1DSB_editingFinished();
|
||||
void on_rxbattAlarm2DSB_editingFinished();
|
||||
void on_AltitudeGPS_ChkB_toggled(bool checked);
|
||||
void on_varioSourceCB_currentIndexChanged(int index);
|
||||
void on_varioLimitMin_DSB_editingFinished();
|
||||
void on_varioLimitMax_DSB_editingFinished();
|
||||
void on_varioLimitCenterMin_DSB_editingFinished();
|
||||
@@ -113,6 +112,7 @@ class TelemetryPanel : public ModelPanel
|
||||
void telBarUpdate();
|
||||
void populateVoltsSource();
|
||||
void populateCurrentSource();
|
||||
void populateVarioSource();
|
||||
};
|
||||
|
||||
#endif // TELEMETRY_H
|
||||
|
||||
@@ -774,38 +774,13 @@
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="varioSourceCB">
|
||||
<widget class="QUnsignedAutoComboBox" name="varioSourceCB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Alti</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Alti+</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Vario</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>A1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>A2</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
|
||||
Reference in New Issue
Block a user