mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
OP-970 Fixes a problem with the Radio/Modem warning dialog showing up on board connection.
This commit is contained in:
parent
3c55485d88
commit
d492d3e14e
@ -35,7 +35,7 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
ConfigRevoHWWidget::ConfigRevoHWWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
ConfigRevoHWWidget::ConfigRevoHWWidget(QWidget *parent) : ConfigTaskWidget(parent), m_refreshing(true)
|
||||
{
|
||||
m_ui = new Ui_RevoHWWidget();
|
||||
m_ui->setupUi(this);
|
||||
@ -76,6 +76,7 @@ ConfigRevoHWWidget::ConfigRevoHWWidget(QWidget *parent) : ConfigTaskWidget(paren
|
||||
populateWidgets();
|
||||
refreshWidgetsValues();
|
||||
forceConnectedState();
|
||||
m_refreshing = false;
|
||||
}
|
||||
|
||||
ConfigRevoHWWidget::~ConfigRevoHWWidget()
|
||||
@ -99,12 +100,14 @@ void ConfigRevoHWWidget::setupCustomCombos()
|
||||
|
||||
void ConfigRevoHWWidget::refreshWidgetsValues(UAVObject *obj)
|
||||
{
|
||||
m_refreshing = true;
|
||||
ConfigTaskWidget::refreshWidgetsValues(obj);
|
||||
|
||||
usbVCPPortChanged(0);
|
||||
mainPortChanged(0);
|
||||
flexiPortChanged(0);
|
||||
modemPortChanged(0);
|
||||
m_refreshing = false;
|
||||
}
|
||||
|
||||
void ConfigRevoHWWidget::updateObjectsFromWidgets()
|
||||
@ -292,7 +295,9 @@ 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."));
|
||||
if(!m_refreshing) {
|
||||
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);
|
||||
|
@ -44,6 +44,7 @@ public:
|
||||
~ConfigRevoHWWidget();
|
||||
|
||||
private:
|
||||
bool m_refreshing;
|
||||
Ui_RevoHWWidget *m_ui;
|
||||
void setupCustomCombos();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user