From 0aad612720ffc3b2ad30c6e062371be6d95e1403 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Tue, 1 Nov 2011 01:16:43 +0200 Subject: [PATCH] spektrum: the same type of DSM receivers is now allowed on both CC ports --- .../src/plugins/config/config_cc_hw_widget.cpp | 10 ++++++---- .../src/plugins/config/config_cc_hw_widget.h | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp index b6c543698..6330af20b 100644 --- a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp +++ b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp @@ -62,10 +62,13 @@ void ConfigCCHWWidget::refreshValues() void ConfigCCHWWidget::widgetsContentsChanged() { ConfigTaskWidget::widgetsContentsChanged(); - enableControls(false); - if((m_telemetry->cbFlexi->currentText()==m_telemetry->cbTele->currentText()) && m_telemetry->cbTele->currentText()!="Disabled") + + if (((m_telemetry->cbTele->currentIndex() == HwSettings::CC_MAINPORT_TELEMETRY) && (m_telemetry->cbFlexi->currentIndex() == HwSettings::CC_FLEXIPORT_TELEMETRY)) || + ((m_telemetry->cbTele->currentIndex() == HwSettings::CC_MAINPORT_GPS) && (m_telemetry->cbFlexi->currentIndex() == HwSettings::CC_FLEXIPORT_GPS)) || + ((m_telemetry->cbTele->currentIndex() == HwSettings::CC_MAINPORT_COMAUX) && (m_telemetry->cbFlexi->currentIndex() == HwSettings::CC_FLEXIPORT_COMAUX))) { - m_telemetry->problems->setText("Warning: you have configured the MainPort and the FlexiPort for the same function, this is currently not suported"); + enableControls(false); + m_telemetry->problems->setText(tr("Warning: you have configured both MainPort and FlexiPort for the same function, this currently is not supported")); } else { @@ -83,4 +86,3 @@ void ConfigCCHWWidget::openHelp() * @} * @} */ - diff --git a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.h b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.h index f815786fb..ed97b5c70 100644 --- a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.h +++ b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.h @@ -35,6 +35,7 @@ #include #include #include "smartsavebutton.h" +#include "hwsettings.h" class ConfigCCHWWidget: public ConfigTaskWidget {