diff --git a/ground/openpilotgcs/src/plugins/config/ccpm.ui b/ground/openpilotgcs/src/plugins/config/ccpm.ui index 7730a7a29..77e33e8ca 100644 --- a/ground/openpilotgcs/src/plugins/config/ccpm.ui +++ b/ground/openpilotgcs/src/plugins/config/ccpm.ui @@ -880,7 +880,7 @@ - + Link Roll/Pitch @@ -890,7 +890,7 @@ - + Link Cyclic/Collective @@ -900,80 +900,6 @@ - - - - QLayout::SetNoConstraint - - - - - true - - - - 0 - 0 - - - - - 80 - 0 - - - - - 80 - 16777215 - - - - - 11 - - - - Qt::LeftToRight - - - Collective Ch - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - - - - - true - - - - 0 - 0 - - - - - 90 - 0 - - - - - 100 - 16777215 - - - - - - diff --git a/ground/openpilotgcs/src/plugins/config/configairframewidget.cpp b/ground/openpilotgcs/src/plugins/config/configairframewidget.cpp index 05eb98c4d..a12d34dca 100644 --- a/ground/openpilotgcs/src/plugins/config/configairframewidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configairframewidget.cpp @@ -2173,7 +2173,6 @@ void ConfigAirframeWidget::addToDirtyMonitor() addWidget(m_aircraft->widget_3->m_ccpm->ccpmCollectivePassthrough); addWidget(m_aircraft->widget_3->m_ccpm->ccpmLinkRoll); addWidget(m_aircraft->widget_3->m_ccpm->ccpmLinkCyclic); - addWidget(m_aircraft->widget_3->m_ccpm->ccpmCollectiveChannel); addWidget(m_aircraft->widget_3->m_ccpm->ccpmRevoSlider); addWidget(m_aircraft->widget_3->m_ccpm->ccpmREVOspinBox); addWidget(m_aircraft->widget_3->m_ccpm->ccpmCollectiveSlider); diff --git a/ground/openpilotgcs/src/plugins/config/configccpmwidget.cpp b/ground/openpilotgcs/src/plugins/config/configccpmwidget.cpp index 4a103987a..6d7a974c2 100644 --- a/ground/openpilotgcs/src/plugins/config/configccpmwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configccpmwidget.cpp @@ -147,9 +147,6 @@ ConfigccpmWidget::ConfigccpmWidget(QWidget *parent) : ConfigTaskWidget(parent) UAVObjectField * curve2source = mixerSettings->getField("Curve2Source"); Q_ASSERT(curve2source); - m_ccpm->ccpmCollectiveChannel->addItems(curve2source->getOptions()); - m_ccpm->ccpmCollectiveChannel->setCurrentIndex(0); - QStringList channels; channels << "Channel1" << "Channel2" << "Channel3" << "Channel4" << "Channel5" << "Channel6" << "Channel7" << "Channel8" << "None"; @@ -219,7 +216,6 @@ ConfigccpmWidget::ConfigccpmWidget(QWidget *parent) : ConfigTaskWidget(parent) connect(m_ccpm->SwashLvlCancelButton, SIGNAL(clicked()), this, SLOT(SwashLvlCancelButtonPressed())); connect(m_ccpm->SwashLvlFinishButton, SIGNAL(clicked()), this, SLOT(SwashLvlFinishButtonPressed())); - connect(m_ccpm->ccpmCollectivePassthrough, SIGNAL(clicked()), this, SLOT(SetUIComponentVisibilities())); connect(m_ccpm->ccpmLinkCyclic, SIGNAL(clicked()), this, SLOT(SetUIComponentVisibilities())); connect(m_ccpm->ccpmLinkRoll, SIGNAL(clicked()), this, SLOT(SetUIComponentVisibilities())); @@ -1016,9 +1012,6 @@ void ConfigccpmWidget::UpdateCCPMOptionsFromUI() //correction angle GUIConfigData.heli.CorrectionAngle = m_ccpm->ccpmCorrectionAngle->value(); - //CollectiveChannel - GUIConfigData.heli.CollectiveChannel = m_ccpm->ccpmCollectiveChannel->currentIndex(); - //update sliders if (useCCPM) { @@ -1058,10 +1051,7 @@ void ConfigccpmWidget::UpdateCCPMUIFromOptions() //correction angle m_ccpm->ccpmCorrectionAngle->setValue(GUIConfigData.heli.CorrectionAngle); - - //CollectiveChannel - m_ccpm->ccpmCollectiveChannel->setCurrentIndex(GUIConfigData.heli.CollectiveChannel); - + //update sliders m_ccpm->ccpmCollectiveScale->setValue(GUIConfigData.heli.SliderValue0); m_ccpm->ccpmCollectiveScaleBox->setValue(GUIConfigData.heli.SliderValue0); @@ -1092,9 +1082,6 @@ void ConfigccpmWidget::SetUIComponentVisibilities() m_ccpm->ccpmPitchMixingBox->setVisible(!GUIConfigData.heli.ccpmCollectivePassthroughState && GUIConfigData.heli.ccpmLinkCyclicState); m_ccpm->ccpmCollectiveScalingBox->setVisible(GUIConfigData.heli.ccpmCollectivePassthroughState || !GUIConfigData.heli.ccpmLinkCyclicState); - m_ccpm->ccpmCollectiveChLabel->setVisible(GUIConfigData.heli.ccpmCollectivePassthroughState); - m_ccpm->ccpmCollectiveChannel->setVisible(GUIConfigData.heli.ccpmCollectivePassthroughState); - m_ccpm->ccpmLinkCyclic->setVisible(!GUIConfigData.heli.ccpmCollectivePassthroughState); m_ccpm->ccpmCyclicScalingBox->setVisible((GUIConfigData.heli.ccpmCollectivePassthroughState || !GUIConfigData.heli.ccpmLinkCyclicState) && GUIConfigData.heli.ccpmLinkRollState); @@ -1316,7 +1303,7 @@ void ConfigccpmWidget::sendccpmUpdate() //MixerSettings.Curve2Source = Throttle,Roll,Pitch,Yaw,Accessory0,Accessory1,Accessory2,Accessory3,Accessory4,Accessory5 //check if we are using throttle or directly from a channel... if (GUIConfigData.heli.ccpmCollectivePassthroughState) - mixerSettingsData.Curve2Source = GUIConfigData.heli.CollectiveChannel; + mixerSettingsData.Curve2Source = MixerSettings::CURVE2SOURCE_COLLECTIVE; else mixerSettingsData.Curve2Source = MixerSettings::CURVE2SOURCE_THROTTLE; diff --git a/ground/openpilotgcs/src/plugins/config/configccpmwidget.h b/ground/openpilotgcs/src/plugins/config/configccpmwidget.h index 56898f0fb..c6bc1b27b 100644 --- a/ground/openpilotgcs/src/plugins/config/configccpmwidget.h +++ b/ground/openpilotgcs/src/plugins/config/configccpmwidget.h @@ -57,7 +57,6 @@ typedef struct { uint ccpmCollectivePassthroughState:1; uint ccpmLinkCyclicState:1; uint ccpmLinkRollState:1; - uint CollectiveChannel:3;//20bits uint SliderValue0:7; uint SliderValue1:7; uint SliderValue2:7;//41bits