Commit 3517b6ab authored by Lorenz Meier's avatar Lorenz Meier

Setting widget: Cleanup

parent e5c72b63
......@@ -47,6 +47,12 @@ MAVLinkSettingsWidget::MAVLinkSettingsWidget(MAVLinkProtocol* protocol, QWidget
m_ui->gridLayout->setAlignment(Qt::AlignTop);
// AUTH
m_ui->droneOSCheckBox->setChecked(protocol->getAuthEnabled());
QSettings settings;
m_ui->droneOSComboBox->setCurrentIndex(m_ui->droneOSComboBox->findText(settings.value("DRONEOS_HOST", "droneos.com:14555").toString()));
m_ui->droneOSLineEdit->setText(protocol->getAuthKey());
// Initialize state
m_ui->heartbeatCheckBox->setChecked(protocol->heartbeatsEnabled());
m_ui->loggingCheckBox->setChecked(protocol->loggingEnabled());
......@@ -61,12 +67,6 @@ MAVLinkSettingsWidget::MAVLinkSettingsWidget(MAVLinkProtocol* protocol, QWidget
m_ui->actionGuardCheckBox->setChecked(protocol->actionGuardEnabled());
m_ui->actionRetransmissionSpinBox->setValue(protocol->getActionRetransmissionTimeout());
// AUTH
m_ui->droneOSCheckBox->setChecked(protocol->getAuthEnabled());
QSettings settings;
m_ui->droneOSComboBox->setCurrentIndex(m_ui->droneOSComboBox->findText(settings.value("DRONEOS_HOST", "droneos.com:14555").toString()));
m_ui->droneOSLineEdit->setText(protocol->getAuthKey());
// Connect actions
// Heartbeat
connect(protocol, SIGNAL(heartbeatChanged(bool)), m_ui->heartbeatCheckBox, SLOT(setChecked(bool)));
......@@ -144,11 +144,6 @@ MAVLinkSettingsWidget::MAVLinkSettingsWidget(MAVLinkProtocol* protocol, QWidget
// and then remove these two lines
m_ui->multiplexingFilterCheckBox->setVisible(false);
m_ui->multiplexingFilterLineEdit->setVisible(false);
// // Update settings
// m_ui->loggingCheckBox->setChecked(protocol->loggingEnabled());
// m_ui->heartbeatCheckBox->setChecked(protocol->heartbeatsEnabled());
// m_ui->versionCheckBox->setChecked(protocol->versionCheckEnabled());
}
void MAVLinkSettingsWidget::updateLogfileName(const QString& fileName)
......
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