diff --git a/ground/openpilotgcs/src/plugins/config/configservowidget.cpp b/ground/openpilotgcs/src/plugins/config/configservowidget.cpp index 4362ab23a..3971b981e 100644 --- a/ground/openpilotgcs/src/plugins/config/configservowidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configservowidget.cpp @@ -111,6 +111,15 @@ ConfigServoWidget::ConfigServoWidget(QWidget *parent) : ConfigTaskWidget(parent) << m_config->ch6Min << m_config->ch7Min; + inNeuLabels << m_config->ch0Cur + << m_config->ch1Cur + << m_config->ch2Cur + << m_config->ch3Cur + << m_config->ch4Cur + << m_config->ch5Cur + << m_config->ch6Cur + << m_config->ch7Cur; + inSliders << m_config->inSlider0 << m_config->inSlider1 << m_config->inSlider2 @@ -209,7 +218,11 @@ ConfigServoWidget::ConfigServoWidget(QWidget *parent) : ConfigTaskWidget(parent) } } - for (int i = 0; i < 8; i++) { + // set the RC input tneutral value textees + for (int i = 0; i < 8; i++) + inNeuLabels[i]->setText(QString::number(inSliders[i]->value())); + + for (int i = 0; i < 8; i++) { connect(outMin[i], SIGNAL(editingFinished()), this, SLOT(setChOutRange())); connect(outMax[i], SIGNAL(editingFinished()), this, SLOT(setChOutRange())); connect(reversals[i], SIGNAL(toggled(bool)), this, SLOT(reverseChannel(bool))); @@ -280,42 +293,42 @@ ConfigServoWidget::~ConfigServoWidget() void ConfigServoWidget::onInSliderValueChanged0(int value) { - m_config->ch0Cur->setText(QString::number(value)); + inNeuLabels[0]->setText(QString::number(value)); } void ConfigServoWidget::onInSliderValueChanged1(int value) { - m_config->ch1Cur->setText(QString::number(value)); + inNeuLabels[1]->setText(QString::number(value)); } void ConfigServoWidget::onInSliderValueChanged2(int value) { - m_config->ch2Cur->setText(QString::number(value)); + inNeuLabels[2]->setText(QString::number(value)); } void ConfigServoWidget::onInSliderValueChanged3(int value) { - m_config->ch3Cur->setText(QString::number(value)); + inNeuLabels[3]->setText(QString::number(value)); } void ConfigServoWidget::onInSliderValueChanged4(int value) { - m_config->ch4Cur->setText(QString::number(value)); + inNeuLabels[4]->setText(QString::number(value)); } void ConfigServoWidget::onInSliderValueChanged5(int value) { - m_config->ch5Cur->setText(QString::number(value)); + inNeuLabels[5]->setText(QString::number(value)); } void ConfigServoWidget::onInSliderValueChanged6(int value) { - m_config->ch6Cur->setText(QString::number(value)); + inNeuLabels[6]->setText(QString::number(value)); } void ConfigServoWidget::onInSliderValueChanged7(int value) { - m_config->ch7Cur->setText(QString::number(value)); + inNeuLabels[7]->setText(QString::number(value)); } // ************************************ @@ -361,8 +374,19 @@ void ConfigServoWidget::enableControls(bool enable) m_config->getRCOutputCurrent->setEnabled(enable); m_config->doRCInputCalibration->setEnabled(enable); + + m_config->ch0Assign->setEnabled(enable); + m_config->ch1Assign->setEnabled(enable); + m_config->ch2Assign->setEnabled(enable); + m_config->ch3Assign->setEnabled(enable); + m_config->ch4Assign->setEnabled(enable); + m_config->ch5Assign->setEnabled(enable); + m_config->ch6Assign->setEnabled(enable); + m_config->ch7Assign->setEnabled(enable); } +// ************************************ + /** Sends the channel value to the UAV to move the servo. Returns immediately if we are not in testing mode diff --git a/ground/openpilotgcs/src/plugins/config/configservowidget.h b/ground/openpilotgcs/src/plugins/config/configservowidget.h index 71e2b7f13..7c0510729 100644 --- a/ground/openpilotgcs/src/plugins/config/configservowidget.h +++ b/ground/openpilotgcs/src/plugins/config/configservowidget.h @@ -86,6 +86,7 @@ private: QList inWidgetBars; QList inMaxLabels; QList inMinLabels; + QList inNeuLabels; bool firstUpdate; diff --git a/ground/openpilotgcs/src/plugins/config/settingswidget.ui b/ground/openpilotgcs/src/plugins/config/settingswidget.ui index 4160ec574..ccbe14d2f 100644 --- a/ground/openpilotgcs/src/plugins/config/settingswidget.ui +++ b/ground/openpilotgcs/src/plugins/config/settingswidget.ui @@ -28,7 +28,7 @@ 530 40 - 31 + 36 17 @@ -81,9 +81,9 @@ p, li { white-space: pre-wrap; } - 210 + 205 60 - 31 + 36 17 @@ -111,9 +111,9 @@ p, li { white-space: pre-wrap; } - 210 + 205 160 - 31 + 36 17 @@ -171,7 +171,7 @@ p, li { white-space: pre-wrap; } 530 120 - 31 + 36 17 @@ -196,9 +196,9 @@ p, li { white-space: pre-wrap; } - 210 + 205 180 - 31 + 36 17 @@ -242,9 +242,9 @@ p, li { white-space: pre-wrap; } - 210 + 205 80 - 31 + 36 17 @@ -274,7 +274,7 @@ p, li { white-space: pre-wrap; } 530 160 - 31 + 36 17 @@ -301,7 +301,7 @@ p, li { white-space: pre-wrap; } 530 140 - 31 + 36 17 @@ -328,7 +328,7 @@ p, li { white-space: pre-wrap; } 530 100 - 31 + 36 17 @@ -398,9 +398,9 @@ p, li { white-space: pre-wrap; } - 210 + 205 120 - 31 + 36 17 @@ -453,8 +453,8 @@ Be sure to set the Neutral position on all sliders before sending! - DejaVu Sans - 7 + MS Shell Dlg 2 + 8 @@ -470,9 +470,9 @@ Be sure to set the Neutral position on all sliders before sending! - 210 + 205 100 - 31 + 36 17 @@ -502,7 +502,7 @@ p, li { white-space: pre-wrap; } 530 180 - 31 + 36 17 @@ -583,9 +583,9 @@ p, li { white-space: pre-wrap; } - 210 + 205 140 - 31 + 36 17 @@ -699,7 +699,7 @@ p, li { white-space: pre-wrap; } 530 80 - 31 + 36 17 @@ -726,7 +726,7 @@ p, li { white-space: pre-wrap; } 530 60 - 31 + 36 17 @@ -751,9 +751,9 @@ p, li { white-space: pre-wrap; } - 210 + 205 40 - 31 + 36 17 @@ -789,8 +789,8 @@ p, li { white-space: pre-wrap; } - DejaVu Sans - 7 + MS Shell Dlg 2 + 8 @@ -805,8 +805,8 @@ p, li { white-space: pre-wrap; } - DejaVu Sans - 7 + MS Shell Dlg 2 + 8 @@ -821,8 +821,8 @@ p, li { white-space: pre-wrap; } - DejaVu Sans - 7 + MS Shell Dlg 2 + 8 @@ -837,8 +837,8 @@ p, li { white-space: pre-wrap; } - DejaVu Sans - 7 + MS Shell Dlg 2 + 8 @@ -853,8 +853,8 @@ p, li { white-space: pre-wrap; } - DejaVu Sans - 7 + MS Shell Dlg 2 + 8 @@ -869,8 +869,8 @@ p, li { white-space: pre-wrap; } - DejaVu Sans - 7 + MS Shell Dlg 2 + 8 @@ -885,8 +885,8 @@ p, li { white-space: pre-wrap; } - DejaVu Sans - 7 + MS Shell Dlg 2 + 8 @@ -894,11 +894,17 @@ p, li { white-space: pre-wrap; } 20 - 210 - 131 + 213 + 181 22 + + + 75 + true + + Start calibrating the RC Inputs. Uncheck/Check to restart calibration. @@ -921,7 +927,7 @@ Neutral should be put at the bottom of the slider for the throttle. - 10 + 11 75 true