diff --git a/ground/openpilotgcs/src/plugins/config/mixercurve.cpp b/ground/openpilotgcs/src/plugins/config/mixercurve.cpp
index 982abb70c..4ad2e3afe 100644
--- a/ground/openpilotgcs/src/plugins/config/mixercurve.cpp
+++ b/ground/openpilotgcs/src/plugins/config/mixercurve.cpp
@@ -43,8 +43,10 @@ MixerCurve::MixerCurve(QWidget *parent) :
m_mixerUI->SettingsGroup->hide();
- m_mixerUI->ValuesGroup->hide();
m_curve->showCommands(false);
+ m_curve->showCommand("Reset", false);
+ m_curve->showCommand("Popup", false);
+ m_curve->showCommand("Commands", false);
// create our spin delegate
m_spinDelegate = new DoubleSpinDelegate();
@@ -62,6 +64,7 @@ MixerCurve::MixerCurve(QWidget *parent) :
connect(m_mixerUI->CurveType, SIGNAL(currentIndexChanged(int)), this, SLOT(CurveTypeChanged()));
connect(m_mixerUI->ResetCurve, SIGNAL(clicked()), this, SLOT(ResetCurve()));
+ connect(m_mixerUI->PopupCurve, SIGNAL(clicked()),this,SLOT(PopupCurve()));
connect(m_mixerUI->GenerateCurve, SIGNAL(clicked()), this, SLOT(GenerateCurve()));
connect(m_curve, SIGNAL(curveUpdated()), this, SLOT(UpdateSettingsTable()));
connect(m_curve, SIGNAL(commandActivated(Node*)),this, SLOT(CommandActivated(Node*)));
@@ -128,6 +131,21 @@ void MixerCurve::ResetCurve()
UpdateSettingsTable();
}
+void MixerCurve::PopupCurve()
+{
+ if (!m_curve->isCommandActive("Popup")) {
+
+ m_mixerUI->SettingsGroup->show();
+ m_mixerUI->PopupCurve->hide();
+
+ PopupWidget* popup = new PopupWidget();
+ popup->popUp(this);
+
+ m_mixerUI->SettingsGroup->hide();
+ m_mixerUI->PopupCurve->show();
+ m_curve->showCommands(false);
+ }
+}
void MixerCurve::UpdateCurveUI()
{
//get the user settings
@@ -363,18 +381,8 @@ void MixerCurve::CommandActivated(Node* node)
else if (name == "Commands") {
}
- else if (name == "Popup" && !m_curve->isCommandActive("Popup")) {
- m_mixerUI->SettingsGroup->show();
- m_mixerUI->ValuesGroup->show();
- m_curve->showCommand("Popup", false);
-
- PopupWidget* popup = new PopupWidget();
- popup->popUp(this);
-
- m_mixerUI->SettingsGroup->hide();
- m_mixerUI->ValuesGroup->hide();
- m_curve->showCommands(false);
- m_curve->showCommand("Popup", true);
+ else if (name == "Popup" ) {
+ PopupCurve();
}
else if (name == "Linear") {
m_mixerUI->CurveType->setCurrentIndex(m_mixerUI->CurveType->findText("Linear"));
diff --git a/ground/openpilotgcs/src/plugins/config/mixercurve.h b/ground/openpilotgcs/src/plugins/config/mixercurve.h
index 346c3792b..1e60534f6 100644
--- a/ground/openpilotgcs/src/plugins/config/mixercurve.h
+++ b/ground/openpilotgcs/src/plugins/config/mixercurve.h
@@ -79,6 +79,7 @@ protected:
public slots:
void ResetCurve();
+ void PopupCurve();
void GenerateCurve();
void UpdateSettingsTable();
diff --git a/ground/openpilotgcs/src/plugins/config/mixercurve.ui b/ground/openpilotgcs/src/plugins/config/mixercurve.ui
index 7adf707da..e59882d89 100644
--- a/ground/openpilotgcs/src/plugins/config/mixercurve.ui
+++ b/ground/openpilotgcs/src/plugins/config/mixercurve.ui
@@ -6,8 +6,8 @@
0
0
- 441
- 334
+ 543
+ 467
@@ -183,79 +183,6 @@
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
- -
-
-
- Reset
-
-
-
-
- GenerateCurve
- CurveSettings
- ResetCurve
- CurveType
- verticalSpacer
-
-
- -
-
-
-
- 5
- 5
-
-
-
-
- 50
- 50
-
-
-
-
- 1000
- 1000
-
-
-
-
- 10
- 10
-
-
-
-
- 200
- 200
-
-
-
-
- 7
-
-
-
-
- -
-
-
-
-
-
-
@@ -332,21 +259,101 @@
-
-
+
- Qt::Horizontal
+ Qt::Vertical
- 40
- 20
+ 20
+ 40
+ GenerateCurve
+ CurveSettings
+ CurveType
+ CurveMin
+ minLabel
+ CurveMax
+ maxLabel
+ CurveStep
+ stepLabel
+ verticalSpacer
+ -
+
+
+
+ 5
+ 5
+
+
+
+
+ 50
+ 50
+
+
+
+
+ 1000
+ 1000
+
+
+
+
+ 10
+ 10
+
+
+
+
+ 200
+ 200
+
+
+
+
+ 7
+
+
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Reset
+
+
+
+ -
+
+
+ Advanced...
+
+
+
+
+