This commit is contained in:
Bertrand Songis
2015-09-14 21:35:02 +02:00
parent 3aac623a4b
commit fbb5adcebb
2 changed files with 8 additions and 7 deletions
+7 -6
View File
@@ -710,6 +710,7 @@ TelemetryPanel::TelemetryPanel(QWidget *parent, ModelData & model, GeneralSettin
ui->sensorsLayout->addWidget(panel); ui->sensorsLayout->addWidget(panel);
sensorPanels[i] = panel; sensorPanels[i] = panel;
connect(panel, SIGNAL(nameModified()), this, SLOT(update())); connect(panel, SIGNAL(nameModified()), this, SLOT(update()));
connect(panel, SIGNAL(modified()), this, SLOT(onModified()));
} }
} }
else { else {
@@ -719,14 +720,14 @@ TelemetryPanel::TelemetryPanel(QWidget *parent, ModelData & model, GeneralSettin
connect(analogs[0], SIGNAL(modified()), this, SLOT(onAnalogModified())); connect(analogs[0], SIGNAL(modified()), this, SLOT(onAnalogModified()));
analogs[1] = new TelemetryAnalog(this, model.frsky.channels[1], model, generalSettings, firmware); analogs[1] = new TelemetryAnalog(this, model.frsky.channels[1], model, generalSettings, firmware);
ui->A2Layout->addWidget(analogs[1]); ui->A2Layout->addWidget(analogs[1]);
connect(analogs[1], SIGNAL(modified()), this, SLOT(onAnalogModified())); connect(analogs[1], SIGNAL(modified()), this, SLOT(onModified()));
} }
if (IS_TARANIS(firmware->getBoard())) { if (IS_TARANIS(firmware->getBoard())) {
ui->voltsSource->setField(model.frsky.voltsSource); ui->voltsSource->setField(model.frsky.voltsSource, this);
ui->altitudeSource->setField(model.frsky.altitudeSource); ui->altitudeSource->setField(model.frsky.altitudeSource, this);
ui->varioSource->setField(model.frsky.varioSource); ui->varioSource->setField(model.frsky.varioSource, this);
ui->varioCenterSilent->setField(model.frsky.varioCenterSilent); ui->varioCenterSilent->setField(model.frsky.varioCenterSilent, this);
} }
else { else {
ui->topbarGB->hide(); ui->topbarGB->hide();
@@ -937,7 +938,7 @@ void TelemetryPanel::on_telemetryProtocol_currentIndexChanged(int index)
} }
} }
void TelemetryPanel::onAnalogModified() void TelemetryPanel::onModified()
{ {
emit modified(); emit modified();
} }
+1 -1
View File
@@ -118,7 +118,7 @@ class TelemetryPanel : public ModelPanel
private slots: private slots:
void on_telemetryProtocol_currentIndexChanged(int index); void on_telemetryProtocol_currentIndexChanged(int index);
void onAnalogModified(); void onModified();
void on_frskyProtoCB_currentIndexChanged(int index); void on_frskyProtoCB_currentIndexChanged(int index);
void on_bladesCount_editingFinished(); void on_bladesCount_editingFinished();
void on_rssiAlarm1CB_currentIndexChanged(int index); void on_rssiAlarm1CB_currentIndexChanged(int index);