mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
Neutral position text is now correctly set on GCS start up on the RC input config widget.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2920 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
ffdfedfaa1
commit
4eec350318
@ -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
|
||||
|
@ -86,6 +86,7 @@ private:
|
||||
QList<WidgetBar*> inWidgetBars;
|
||||
QList<QLabel*> inMaxLabels;
|
||||
QList<QLabel*> inMinLabels;
|
||||
QList<QLabel*> inNeuLabels;
|
||||
|
||||
bool firstUpdate;
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
<rect>
|
||||
<x>530</x>
|
||||
<y>40</y>
|
||||
<width>31</width>
|
||||
<width>36</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -81,9 +81,9 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="QLabel" name="ch1Min">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<x>205</x>
|
||||
<y>60</y>
|
||||
<width>31</width>
|
||||
<width>36</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -111,9 +111,9 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="QLabel" name="ch6Min">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<x>205</x>
|
||||
<y>160</y>
|
||||
<width>31</width>
|
||||
<width>36</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -171,7 +171,7 @@ p, li { white-space: pre-wrap; }
|
||||
<rect>
|
||||
<x>530</x>
|
||||
<y>120</y>
|
||||
<width>31</width>
|
||||
<width>36</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -196,9 +196,9 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="QLabel" name="ch7Min">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<x>205</x>
|
||||
<y>180</y>
|
||||
<width>31</width>
|
||||
<width>36</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -242,9 +242,9 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="QLabel" name="ch2Min">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<x>205</x>
|
||||
<y>80</y>
|
||||
<width>31</width>
|
||||
<width>36</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -274,7 +274,7 @@ p, li { white-space: pre-wrap; }
|
||||
<rect>
|
||||
<x>530</x>
|
||||
<y>160</y>
|
||||
<width>31</width>
|
||||
<width>36</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -301,7 +301,7 @@ p, li { white-space: pre-wrap; }
|
||||
<rect>
|
||||
<x>530</x>
|
||||
<y>140</y>
|
||||
<width>31</width>
|
||||
<width>36</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -328,7 +328,7 @@ p, li { white-space: pre-wrap; }
|
||||
<rect>
|
||||
<x>530</x>
|
||||
<y>100</y>
|
||||
<width>31</width>
|
||||
<width>36</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -398,9 +398,9 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="QLabel" name="ch4Min">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<x>205</x>
|
||||
<y>120</y>
|
||||
<width>31</width>
|
||||
<width>36</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -453,8 +453,8 @@ Be sure to set the Neutral position on all sliders before sending!</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>DejaVu Sans</family>
|
||||
<pointsize>7</pointsize>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
@ -470,9 +470,9 @@ Be sure to set the Neutral position on all sliders before sending!</string>
|
||||
<widget class="QLabel" name="ch3Min">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<x>205</x>
|
||||
<y>100</y>
|
||||
<width>31</width>
|
||||
<width>36</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -502,7 +502,7 @@ p, li { white-space: pre-wrap; }
|
||||
<rect>
|
||||
<x>530</x>
|
||||
<y>180</y>
|
||||
<width>31</width>
|
||||
<width>36</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -583,9 +583,9 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="QLabel" name="ch5Min">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<x>205</x>
|
||||
<y>140</y>
|
||||
<width>31</width>
|
||||
<width>36</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -699,7 +699,7 @@ p, li { white-space: pre-wrap; }
|
||||
<rect>
|
||||
<x>530</x>
|
||||
<y>80</y>
|
||||
<width>31</width>
|
||||
<width>36</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -726,7 +726,7 @@ p, li { white-space: pre-wrap; }
|
||||
<rect>
|
||||
<x>530</x>
|
||||
<y>60</y>
|
||||
<width>31</width>
|
||||
<width>36</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -751,9 +751,9 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="QLabel" name="ch0Min">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<x>205</x>
|
||||
<y>40</y>
|
||||
<width>31</width>
|
||||
<width>36</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -789,8 +789,8 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>DejaVu Sans</family>
|
||||
<pointsize>7</pointsize>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
@ -805,8 +805,8 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>DejaVu Sans</family>
|
||||
<pointsize>7</pointsize>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
@ -821,8 +821,8 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>DejaVu Sans</family>
|
||||
<pointsize>7</pointsize>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
@ -837,8 +837,8 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>DejaVu Sans</family>
|
||||
<pointsize>7</pointsize>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
@ -853,8 +853,8 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>DejaVu Sans</family>
|
||||
<pointsize>7</pointsize>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
@ -869,8 +869,8 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>DejaVu Sans</family>
|
||||
<pointsize>7</pointsize>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
@ -885,8 +885,8 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>DejaVu Sans</family>
|
||||
<pointsize>7</pointsize>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>8</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
@ -894,11 +894,17 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>210</y>
|
||||
<width>131</width>
|
||||
<y>213</y>
|
||||
<width>181</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>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.</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
<pointsize>11</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
|
Loading…
x
Reference in New Issue
Block a user