From 805ee4e9b521b64f472ce1ad160a1cee5c9f5dcf Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sat, 4 Apr 2015 17:21:38 +0200 Subject: [PATCH] OP-1822 Check visibility and avoid false error that skip Mixer table to populate --- .../plugins/config/cfg_vehicletypes/configccpmwidget.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp index a770de2dd..b1f2901cf 100644 --- a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configccpmwidget.cpp @@ -674,7 +674,6 @@ void ConfigCcpmWidget::UpdateMixer() if (throwConfigError(QString("HeliCP"))) { return; } - GUIConfigDataUnion config = getConfigData(); useCCPM = !(config.heli.ccpmCollectivePassthroughState || !config.heli.ccpmLinkCyclicState); @@ -1567,28 +1566,28 @@ bool ConfigCcpmWidget::throwConfigError(QString airframeType) bool error = false; - if ((m_aircraft->ccpmServoWChannel->currentIndex() == 0) && (m_aircraft->ccpmServoWChannel->isEnabled())) { + if ((m_aircraft->ccpmServoWChannel->currentIndex() == 0) && (m_aircraft->ccpmServoWChannel->isVisible())) { m_aircraft->ccpmServoWLabel->setText("" + m_aircraft->ccpmServoWLabel->text() + ""); error = true; } else { m_aircraft->ccpmServoWLabel->setText(QTextEdit(m_aircraft->ccpmServoWLabel->text()).toPlainText()); } - if ((m_aircraft->ccpmServoXChannel->currentIndex() == 0) && (m_aircraft->ccpmServoXChannel->isEnabled())) { + if ((m_aircraft->ccpmServoXChannel->currentIndex() == 0) && (m_aircraft->ccpmServoXChannel->isVisible())) { m_aircraft->ccpmServoXLabel->setText("" + m_aircraft->ccpmServoXLabel->text() + ""); error = true; } else { m_aircraft->ccpmServoXLabel->setText(QTextEdit(m_aircraft->ccpmServoXLabel->text()).toPlainText()); } - if ((m_aircraft->ccpmServoYChannel->currentIndex() == 0) && (m_aircraft->ccpmServoYChannel->isEnabled())) { + if ((m_aircraft->ccpmServoYChannel->currentIndex() == 0) && (m_aircraft->ccpmServoYChannel->isVisible())) { m_aircraft->ccpmServoYLabel->setText("" + m_aircraft->ccpmServoYLabel->text() + ""); error = true; } else { m_aircraft->ccpmServoYLabel->setText(QTextEdit(m_aircraft->ccpmServoYLabel->text()).toPlainText()); } - if ((m_aircraft->ccpmServoZChannel->currentIndex() == 0) && (m_aircraft->ccpmServoZChannel->isEnabled())) { + if ((m_aircraft->ccpmServoZChannel->currentIndex() == 0) && (m_aircraft->ccpmServoZChannel->isVisible())) { m_aircraft->ccpmServoZLabel->setText("" + m_aircraft->ccpmServoZLabel->text() + ""); error = true; } else {