1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-02 10:24:11 +01:00

OP-970 Adds antenna warning dialog when activating built in modem for Revolution.

This commit is contained in:
Fredrik Arvidsson 2013-05-25 09:42:26 +02:00
parent 5fcc8a1785
commit 03a2e82ba3

View File

@ -32,6 +32,7 @@
#include "hwsettings.h"
#include <QDesktopServices>
#include <QUrl>
#include <QMessageBox>
ConfigRevoHWWidget::ConfigRevoHWWidget(QWidget *parent) : ConfigTaskWidget(parent)
@ -93,7 +94,7 @@ void ConfigRevoHWWidget::setupCustomCombos()
connect(m_ui->cbFlexi, SIGNAL(currentIndexChanged(int)), this, SLOT(flexiPortChanged(int)));
connect(m_ui->cbMain, SIGNAL(currentIndexChanged(int)), this, SLOT(mainPortChanged(int)));
connect(m_ui->cbModem, SIGNAL(currentIndexChanged(int)), this, SLOT(modemPortChanged(int)));
connect(m_ui->cbModem, SIGNAL(currentIndexChanged(int)), this, SLOT(modemPortChanged(int)));
}
void ConfigRevoHWWidget::refreshWidgetsValues(UAVObject *obj)
@ -291,6 +292,7 @@ void ConfigRevoHWWidget::modemPortChanged(int index)
m_ui->cbTxPower->setVisible(true);
m_ui->lblInitFreq->setVisible(true);
m_ui->leInitFreq->setVisible(true);
QMessageBox::warning(this, tr("Warning"), tr("Activating the Radio requires an antenna be attached, or modem damage will occur."));
} else {
m_ui->lblTxPower->setVisible(false);
m_ui->cbTxPower->setVisible(false);