Commit 1ce28cb9 authored by Lorenz Meier's avatar Lorenz Meier

Fixed sensor config

parent cb3618b8
......@@ -118,7 +118,7 @@ QGCPX4SensorCalibration::QGCPX4SensorCalibration(QWidget *parent) :
connect(ui->autopilotComboBox, SIGNAL(activated(int)), this, SLOT(setAutopilotOrientation(int)));
connect(ui->magComboBox, SIGNAL(activated(int)), this, SLOT(setGpsOrientation(int)));
// XXX ask for params (if not loaded)
updateIcons();
}
QGCPX4SensorCalibration::~QGCPX4SensorCalibration()
......@@ -282,9 +282,8 @@ void QGCPX4SensorCalibration::setGpsImage(const QString &path)
ui->gpsLabel->setPixmap(gpsIcon.scaled(w, h, Qt::KeepAspectRatio, Qt::SmoothTransformation));
}
void QGCPX4SensorCalibration::resizeEvent(QResizeEvent* event)
void QGCPX4SensorCalibration::updateIcons()
{
int w = ui->iconLabel->width();
int h = ui->iconLabel->height();
ui->iconLabel->setPixmap(instructionIcon.scaled(w, h, Qt::KeepAspectRatio, Qt::SmoothTransformation));
......@@ -296,7 +295,11 @@ void QGCPX4SensorCalibration::resizeEvent(QResizeEvent* event)
int wg = ui->gpsLabel->width();
int hg = ui->gpsLabel->height();
ui->gpsLabel->setPixmap(gpsIcon.scaled(wg, hg, Qt::KeepAspectRatio, Qt::SmoothTransformation));
}
void QGCPX4SensorCalibration::resizeEvent(QResizeEvent* event)
{
updateIcons();
QWidget::resizeEvent(event);
}
......
......@@ -75,9 +75,12 @@ protected:
void setMagCalibrated(bool calibrated);
void setGyroCalibrated(bool calibrated);
void setAccelCalibrated(bool calibrated);
void updateIcons();
private:
Ui::QGCPX4SensorCalibration *ui;
};
#endif // QGCPX4SENSORCALIBRATION_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment