mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
Add support for coaxial helicopter.
Untested.
This commit is contained in:
parent
8b91e19733
commit
c3a402e52f
@ -126,7 +126,7 @@ QGroupBox::title {
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Outputs</string>
|
<string>Motor outputs</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_18">
|
<layout class="QGridLayout" name="gridLayout_18">
|
||||||
<property name="horizontalSpacing">
|
<property name="horizontalSpacing">
|
||||||
@ -266,7 +266,7 @@ QGroupBox::title {
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Swashplate Outputs</string>
|
<string>Swashplate outputs</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_19">
|
<layout class="QGridLayout" name="gridLayout_19">
|
||||||
<property name="horizontalSpacing">
|
<property name="horizontalSpacing">
|
||||||
|
@ -155,9 +155,10 @@ ConfigCcpmWidget::ConfigCcpmWidget(QWidget *parent) : VehicleConfig(parent)
|
|||||||
m_ccpm->ccpmServoZChannel->setCurrentIndex(0);
|
m_ccpm->ccpmServoZChannel->setCurrentIndex(0);
|
||||||
|
|
||||||
QStringList Types;
|
QStringList Types;
|
||||||
Types << QString::fromUtf8("CCPM 2 Servo 90º") << QString::fromUtf8("CCPM 3 Servo 90º") <<
|
Types << QString::fromUtf8("CCPM 2 Servo 90º") << QString::fromUtf8("CCPM 3 Servo 90º") << QString::fromUtf8("CCPM 4 Servo 90º") <<
|
||||||
QString::fromUtf8("CCPM 4 Servo 90º") << QString::fromUtf8("CCPM 3 Servo 120º") <<
|
QString::fromUtf8("CCPM 3 Servo 120º") << QString::fromUtf8("CCPM 3 Servo 140º") <<
|
||||||
QString::fromUtf8("CCPM 3 Servo 140º") << QString::fromUtf8("FP 2 Servo 90º") <<
|
QString::fromUtf8("FP 2 Servo 90º") <<
|
||||||
|
QString::fromUtf8("Coax 2 Servo 90º") <<
|
||||||
QString::fromUtf8("Custom - User Angles") << QString::fromUtf8("Custom - Advanced Settings");
|
QString::fromUtf8("Custom - User Angles") << QString::fromUtf8("Custom - Advanced Settings");
|
||||||
m_ccpm->ccpmType->addItems(Types);
|
m_ccpm->ccpmType->addItems(Types);
|
||||||
m_ccpm->ccpmType->setCurrentIndex(m_ccpm->ccpmType->count() - 1);
|
m_ccpm->ccpmType->setCurrentIndex(m_ccpm->ccpmType->count() - 1);
|
||||||
@ -287,7 +288,6 @@ QStringList ConfigCcpmWidget::getChannelDescriptions()
|
|||||||
void ConfigCcpmWidget::UpdateType()
|
void ConfigCcpmWidget::UpdateType()
|
||||||
{
|
{
|
||||||
int TypeInt,SingleServoIndex,NumServosDefined;
|
int TypeInt,SingleServoIndex,NumServosDefined;
|
||||||
QString TypeText;
|
|
||||||
double AdjustmentAngle=0;
|
double AdjustmentAngle=0;
|
||||||
|
|
||||||
SetUIComponentVisibilities();
|
SetUIComponentVisibilities();
|
||||||
@ -343,7 +343,7 @@ void ConfigCcpmWidget::UpdateType()
|
|||||||
NumServosDefined=2;
|
NumServosDefined=2;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (TypeText.compare(QString::fromUtf8("CCPM 3 Servo 90º"), Qt::CaseInsensitive)==0)
|
else if (TypeText.compare(QString::fromUtf8("CCPM 3 Servo 90º"), Qt::CaseInsensitive)==0)
|
||||||
{
|
{
|
||||||
m_ccpm->ccpmAngleW->setValue(AdjustmentAngle + 0);
|
m_ccpm->ccpmAngleW->setValue(AdjustmentAngle + 0);
|
||||||
m_ccpm->ccpmAngleX->setValue(fmod(AdjustmentAngle + 90,360));
|
m_ccpm->ccpmAngleX->setValue(fmod(AdjustmentAngle + 90,360));
|
||||||
@ -356,7 +356,7 @@ void ConfigCcpmWidget::UpdateType()
|
|||||||
NumServosDefined=3;
|
NumServosDefined=3;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (TypeText.compare(QString::fromUtf8("CCPM 4 Servo 90º"), Qt::CaseInsensitive)==0)
|
else if (TypeText.compare(QString::fromUtf8("CCPM 4 Servo 90º"), Qt::CaseInsensitive)==0)
|
||||||
{
|
{
|
||||||
m_ccpm->ccpmAngleW->setValue(AdjustmentAngle + 0);
|
m_ccpm->ccpmAngleW->setValue(AdjustmentAngle + 0);
|
||||||
m_ccpm->ccpmAngleX->setValue(fmod(AdjustmentAngle + 90,360));
|
m_ccpm->ccpmAngleX->setValue(fmod(AdjustmentAngle + 90,360));
|
||||||
@ -368,7 +368,7 @@ void ConfigCcpmWidget::UpdateType()
|
|||||||
NumServosDefined=4;
|
NumServosDefined=4;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (TypeText.compare(QString::fromUtf8("CCPM 3 Servo 120º"), Qt::CaseInsensitive)==0)
|
else if (TypeText.compare(QString::fromUtf8("CCPM 3 Servo 120º"), Qt::CaseInsensitive)==0)
|
||||||
{
|
{
|
||||||
m_ccpm->ccpmAngleW->setValue(AdjustmentAngle + 0);
|
m_ccpm->ccpmAngleW->setValue(AdjustmentAngle + 0);
|
||||||
m_ccpm->ccpmAngleX->setValue(fmod(AdjustmentAngle + 120,360));
|
m_ccpm->ccpmAngleX->setValue(fmod(AdjustmentAngle + 120,360));
|
||||||
@ -381,7 +381,7 @@ void ConfigCcpmWidget::UpdateType()
|
|||||||
NumServosDefined=3;
|
NumServosDefined=3;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (TypeText.compare(QString::fromUtf8("CCPM 3 Servo 140º"), Qt::CaseInsensitive)==0)
|
else if (TypeText.compare(QString::fromUtf8("CCPM 3 Servo 140º"), Qt::CaseInsensitive)==0)
|
||||||
{
|
{
|
||||||
m_ccpm->ccpmAngleW->setValue(AdjustmentAngle + 0);
|
m_ccpm->ccpmAngleW->setValue(AdjustmentAngle + 0);
|
||||||
m_ccpm->ccpmAngleX->setValue(fmod(AdjustmentAngle + 140,360));
|
m_ccpm->ccpmAngleX->setValue(fmod(AdjustmentAngle + 140,360));
|
||||||
@ -394,7 +394,7 @@ void ConfigCcpmWidget::UpdateType()
|
|||||||
NumServosDefined=3;
|
NumServosDefined=3;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (TypeText.compare(QString::fromUtf8("FP 2 Servo 90º"), Qt::CaseInsensitive)==0)
|
else if (TypeText.compare(QString::fromUtf8("FP 2 Servo 90º"), Qt::CaseInsensitive)==0)
|
||||||
{
|
{
|
||||||
m_ccpm->ccpmAngleW->setValue(AdjustmentAngle + 0);
|
m_ccpm->ccpmAngleW->setValue(AdjustmentAngle + 0);
|
||||||
m_ccpm->ccpmAngleX->setValue(fmod(AdjustmentAngle + 90,360));
|
m_ccpm->ccpmAngleX->setValue(fmod(AdjustmentAngle + 90,360));
|
||||||
@ -417,6 +417,41 @@ void ConfigCcpmWidget::UpdateType()
|
|||||||
//m_ccpm->label_41->setVisible(0);
|
//m_ccpm->label_41->setVisible(0);
|
||||||
NumServosDefined=2;
|
NumServosDefined=2;
|
||||||
}
|
}
|
||||||
|
else if (TypeText.compare(QString::fromUtf8("Coax 2 Servo 90º"), Qt::CaseInsensitive)==0)
|
||||||
|
{
|
||||||
|
m_ccpm->ccpmAngleW->setValue(AdjustmentAngle + 0);
|
||||||
|
m_ccpm->ccpmAngleX->setValue(fmod(AdjustmentAngle + 90,360));
|
||||||
|
m_ccpm->ccpmAngleY->setValue(0);
|
||||||
|
m_ccpm->ccpmAngleZ->setValue(0);
|
||||||
|
m_ccpm->ccpmAngleY->setEnabled(0);
|
||||||
|
m_ccpm->ccpmAngleZ->setEnabled(0);
|
||||||
|
m_ccpm->ccpmServoYChannel->setCurrentIndex(0);
|
||||||
|
m_ccpm->ccpmServoZChannel->setCurrentIndex(0);
|
||||||
|
m_ccpm->ccpmServoYChannel->setEnabled(0);
|
||||||
|
m_ccpm->ccpmServoZChannel->setEnabled(0);
|
||||||
|
//m_ccpm->ccpmCorrectionAngle->setValue(0);
|
||||||
|
|
||||||
|
m_ccpm->ccpmCollectivespinBox->setEnabled(0);
|
||||||
|
m_ccpm->ccpmCollectiveSlider->setEnabled(0);
|
||||||
|
m_ccpm->ccpmCollectivespinBox->setValue(0);
|
||||||
|
m_ccpm->ccpmCollectiveSlider->setValue(0);
|
||||||
|
m_ccpm->PitchCurve->setVisible(0);
|
||||||
|
//m_ccpm->customThrottleCurve2Value->setVisible(0);
|
||||||
|
//m_ccpm->label_41->setVisible(0);
|
||||||
|
NumServosDefined=2;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Set the text of the motor boxes
|
||||||
|
if (TypeText.compare(QString::fromUtf8("Coax 2 Servo 90º"), Qt::CaseInsensitive)==0)
|
||||||
|
{
|
||||||
|
m_ccpm->ccpmEngineLabel->setText("CW motor");
|
||||||
|
m_ccpm->ccpmTailLabel->setText("CCW motor");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
m_ccpm->ccpmEngineLabel->setText("Engine");
|
||||||
|
m_ccpm->ccpmTailLabel->setText("Tail rotor");
|
||||||
|
}
|
||||||
|
|
||||||
//set the visibility of the swashplate servo selection boxes
|
//set the visibility of the swashplate servo selection boxes
|
||||||
m_ccpm->ccpmServoWLabel->setVisible(NumServosDefined>=1);
|
m_ccpm->ccpmServoWLabel->setVisible(NumServosDefined>=1);
|
||||||
@ -445,9 +480,6 @@ void ConfigCcpmWidget::UpdateType()
|
|||||||
m_ccpm->ccpmAdvancedSettingsTable->verticalHeader()->width())/6);
|
m_ccpm->ccpmAdvancedSettingsTable->verticalHeader()->width())/6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//update UI
|
//update UI
|
||||||
ccpmSwashplateUpdate();
|
ccpmSwashplateUpdate();
|
||||||
|
|
||||||
@ -630,25 +662,40 @@ void ConfigCcpmWidget::UpdateMixer()
|
|||||||
//go through the user data and update the mixer matrix
|
//go through the user data and update the mixer matrix
|
||||||
for (i=0;i<6;i++)
|
for (i=0;i<6;i++)
|
||||||
{
|
{
|
||||||
if ((MixerChannelData[i]>0)&&((ThisEnable[i])||(i<2)))
|
if ((MixerChannelData[i]>0) && ((ThisEnable[i])||(i<2)))
|
||||||
{
|
{
|
||||||
m_ccpm->ccpmAdvancedSettingsTable->item(i,0)->setText(QString("%1").arg( MixerChannelData[i] ));
|
m_ccpm->ccpmAdvancedSettingsTable->item(i,0)->setText(QString("%1").arg( MixerChannelData[i] ));
|
||||||
//config the vector
|
|
||||||
|
//Generate the mixer vector
|
||||||
if (i==0)
|
if (i==0)
|
||||||
{//motor-engine
|
{//main motor-engine
|
||||||
m_ccpm->ccpmAdvancedSettingsTable->item(i,1)->setText(QString("%1").arg(127));//ThrottleCurve1
|
m_ccpm->ccpmAdvancedSettingsTable->item(i,1)->setText(QString("%1").arg(127));//ThrottleCurve1
|
||||||
m_ccpm->ccpmAdvancedSettingsTable->item(i,2)->setText(QString("%1").arg(0));//ThrottleCurve2
|
m_ccpm->ccpmAdvancedSettingsTable->item(i,2)->setText(QString("%1").arg(0));//ThrottleCurve2
|
||||||
m_ccpm->ccpmAdvancedSettingsTable->item(i,3)->setText(QString("%1").arg(0));//Roll
|
m_ccpm->ccpmAdvancedSettingsTable->item(i,3)->setText(QString("%1").arg(0));//Roll
|
||||||
m_ccpm->ccpmAdvancedSettingsTable->item(i,4)->setText(QString("%1").arg(0));//Pitch
|
m_ccpm->ccpmAdvancedSettingsTable->item(i,4)->setText(QString("%1").arg(0));//Pitch
|
||||||
|
|
||||||
|
if (TypeText.compare(QString::fromUtf8("Coax 2 Servo 90º"), Qt::CaseInsensitive)==0)
|
||||||
|
m_ccpm->ccpmAdvancedSettingsTable->item(i,5)->setText(QString("%1").arg(-127));//Yaw
|
||||||
|
else
|
||||||
m_ccpm->ccpmAdvancedSettingsTable->item(i,5)->setText(QString("%1").arg(0));//Yaw
|
m_ccpm->ccpmAdvancedSettingsTable->item(i,5)->setText(QString("%1").arg(0));//Yaw
|
||||||
|
|
||||||
}
|
}
|
||||||
if (i==1)
|
if (i==1)
|
||||||
{//tailrotor
|
{//tailrotor --or-- counter-clockwise motor
|
||||||
|
if (TypeText.compare(QString::fromUtf8("Coax 2 Servo 90º"), Qt::CaseInsensitive)==0)
|
||||||
|
{
|
||||||
|
m_ccpm->ccpmAdvancedSettingsTable->item(i,1)->setText(QString("%1").arg(127));//ThrottleCurve1
|
||||||
|
m_ccpm->ccpmAdvancedSettingsTable->item(i,5)->setText(QString("%1").arg(127));//Yaw
|
||||||
|
}
|
||||||
|
else{
|
||||||
m_ccpm->ccpmAdvancedSettingsTable->item(i,1)->setText(QString("%1").arg(0));//ThrottleCurve1
|
m_ccpm->ccpmAdvancedSettingsTable->item(i,1)->setText(QString("%1").arg(0));//ThrottleCurve1
|
||||||
|
m_ccpm->ccpmAdvancedSettingsTable->item(i,5)->setText(QString("%1").arg(127));//Yaw
|
||||||
|
}
|
||||||
|
|
||||||
m_ccpm->ccpmAdvancedSettingsTable->item(i,2)->setText(QString("%1").arg(0));//ThrottleCurve2
|
m_ccpm->ccpmAdvancedSettingsTable->item(i,2)->setText(QString("%1").arg(0));//ThrottleCurve2
|
||||||
m_ccpm->ccpmAdvancedSettingsTable->item(i,3)->setText(QString("%1").arg(0));//Roll
|
m_ccpm->ccpmAdvancedSettingsTable->item(i,3)->setText(QString("%1").arg(0));//Roll
|
||||||
m_ccpm->ccpmAdvancedSettingsTable->item(i,4)->setText(QString("%1").arg(0));//Pitch
|
m_ccpm->ccpmAdvancedSettingsTable->item(i,4)->setText(QString("%1").arg(0));//Pitch
|
||||||
m_ccpm->ccpmAdvancedSettingsTable->item(i,5)->setText(QString("%1").arg(127));//Yaw
|
|
||||||
}
|
}
|
||||||
if (i>1)
|
if (i>1)
|
||||||
{//Swashplate
|
{//Swashplate
|
||||||
@ -915,12 +962,20 @@ void ConfigCcpmWidget::setMixer()
|
|||||||
{
|
{
|
||||||
if (MixerChannelData[i]>0)
|
if (MixerChannelData[i]>0)
|
||||||
{
|
{
|
||||||
//set the mixer type
|
//Set the mixer type. If Coax, then first two are motors. Otherwise, only first is motor
|
||||||
*(mixerTypes[MixerChannelData[i] - 1]) = i==0 ?
|
if (TypeText.compare(QString::fromUtf8("Coax 2 Servo 90º"), Qt::CaseInsensitive)==0)
|
||||||
MixerSettings::MIXER1TYPE_MOTOR :
|
{
|
||||||
MixerSettings::MIXER1TYPE_SERVO;
|
*(mixerTypes[MixerChannelData[i] - 1]) = i > 1 ?
|
||||||
|
MixerSettings::MIXER1TYPE_SERVO :
|
||||||
|
MixerSettings::MIXER1TYPE_MOTOR;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
*(mixerTypes[MixerChannelData[i] - 1]) = i > 0 ?
|
||||||
|
MixerSettings::MIXER1TYPE_SERVO :
|
||||||
|
MixerSettings::MIXER1TYPE_MOTOR;
|
||||||
|
}
|
||||||
|
|
||||||
//config the vector
|
//Configure the vector
|
||||||
for (j=0;j<5;j++)
|
for (j=0;j<5;j++)
|
||||||
mixers[MixerChannelData[i] - 1][j] = m_ccpm->ccpmAdvancedSettingsTable->item(i,j+1)->text().toInt();
|
mixers[MixerChannelData[i] - 1][j] = m_ccpm->ccpmAdvancedSettingsTable->item(i,j+1)->text().toInt();
|
||||||
}
|
}
|
||||||
@ -1455,60 +1510,64 @@ bool ConfigCcpmWidget::throwConfigError(QString airframeType)
|
|||||||
|
|
||||||
bool error = false;
|
bool error = false;
|
||||||
|
|
||||||
if((m_ccpm->ccpmServoWChannel->currentIndex()==0)&&(m_ccpm->ccpmServoWChannel->isEnabled()))
|
if((m_ccpm->ccpmServoWChannel->currentIndex()==0) && (m_ccpm->ccpmServoWChannel->isEnabled()))
|
||||||
{
|
{
|
||||||
m_ccpm->ccpmServoWLabel->setText("<font color=red>Servo W</font>");
|
m_ccpm->ccpmServoWLabel->setText("<font color=red>" + m_ccpm->ccpmServoWLabel->text() + "</font>");
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_ccpm->ccpmServoWLabel->setText("<font color=black>Servo W</font>");
|
m_ccpm->ccpmServoWLabel->setText(QTextEdit(m_ccpm->ccpmServoWLabel->text()).toPlainText());
|
||||||
}
|
|
||||||
if((m_ccpm->ccpmServoXChannel->currentIndex()==0)&&(m_ccpm->ccpmServoXChannel->isEnabled()))
|
|
||||||
{
|
|
||||||
m_ccpm->ccpmServoXLabel->setText("<font color=red>Servo X</font>");
|
|
||||||
error = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_ccpm->ccpmServoXLabel->setText("<font color=black>Servo X</font>");
|
|
||||||
}
|
|
||||||
if((m_ccpm->ccpmServoYChannel->currentIndex()==0)&&(m_ccpm->ccpmServoYChannel->isEnabled()))
|
|
||||||
{
|
|
||||||
m_ccpm->ccpmServoYLabel->setText("<font color=red>Servo Y</font>");
|
|
||||||
error = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_ccpm->ccpmServoYLabel->setText("<font color=black>Servo Y</font>");
|
|
||||||
}
|
|
||||||
if((m_ccpm->ccpmServoZChannel->currentIndex()==0)&&(m_ccpm->ccpmServoZChannel->isEnabled()))
|
|
||||||
{
|
|
||||||
m_ccpm->ccpmServoZLabel->setText("<font color=red>Servo Z</font>");
|
|
||||||
error = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_ccpm->ccpmServoZLabel->setText("<font color=black>Servo Z</font>");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if((m_ccpm->ccpmEngineChannel->currentIndex()==0)&&(m_ccpm->ccpmEngineChannel->isEnabled()))
|
if((m_ccpm->ccpmServoXChannel->currentIndex()==0) && (m_ccpm->ccpmServoXChannel->isEnabled()))
|
||||||
{
|
{
|
||||||
m_ccpm->ccpmEngineLabel->setText("<font color=red>Engine</font>");
|
m_ccpm->ccpmServoXLabel->setText("<font color=red>" + m_ccpm->ccpmServoXLabel->text() + "</font>");
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_ccpm->ccpmEngineLabel->setText("<font color=black>Engine</font>");
|
|
||||||
}
|
|
||||||
|
|
||||||
if((m_ccpm->ccpmTailChannel->currentIndex()==0)&&(m_ccpm->ccpmTailChannel->isEnabled()))
|
|
||||||
{
|
|
||||||
m_ccpm->ccpmTailLabel->setText("<font color=red>Tail Rotor</font>");
|
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_ccpm->ccpmTailLabel->setText("<font color=black>Tail Rotor</font>");
|
m_ccpm->ccpmServoXLabel->setText(QTextEdit(m_ccpm->ccpmServoXLabel->text()).toPlainText());
|
||||||
|
}
|
||||||
|
|
||||||
|
if((m_ccpm->ccpmServoYChannel->currentIndex()==0) && (m_ccpm->ccpmServoYChannel->isEnabled()))
|
||||||
|
{
|
||||||
|
m_ccpm->ccpmServoYLabel->setText("<font color=red>" + m_ccpm->ccpmServoYLabel->text() + "</font>");
|
||||||
|
error = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_ccpm->ccpmServoYLabel->setText(QTextEdit(m_ccpm->ccpmServoYLabel->text()).toPlainText());
|
||||||
|
}
|
||||||
|
|
||||||
|
if((m_ccpm->ccpmServoZChannel->currentIndex()==0) && (m_ccpm->ccpmServoZChannel->isEnabled()))
|
||||||
|
{
|
||||||
|
m_ccpm->ccpmServoZLabel->setText("<font color=red>" + m_ccpm->ccpmServoZLabel->text()+ "</font>");
|
||||||
|
error = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_ccpm->ccpmServoZLabel->setText(QTextEdit(m_ccpm->ccpmServoZLabel->text()).toPlainText());
|
||||||
|
}
|
||||||
|
|
||||||
|
if((m_ccpm->ccpmEngineChannel->currentIndex()==0) && (m_ccpm->ccpmEngineChannel->isEnabled()))
|
||||||
|
{
|
||||||
|
m_ccpm->ccpmEngineLabel->setText("<font color=red>" + m_ccpm->ccpmEngineLabel->text() + "</font>");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_ccpm->ccpmEngineLabel->setText(QTextEdit(m_ccpm->ccpmEngineLabel->text()).toPlainText());
|
||||||
|
}
|
||||||
|
|
||||||
|
if((m_ccpm->ccpmTailChannel->currentIndex()==0) && (m_ccpm->ccpmTailChannel->isEnabled()))
|
||||||
|
{
|
||||||
|
m_ccpm->ccpmTailLabel->setText("<font color=red>" + m_ccpm->ccpmTailLabel->text() + "</font>");
|
||||||
|
error = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_ccpm->ccpmTailLabel->setText(QTextEdit(m_ccpm->ccpmTailLabel->text()).toPlainText());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
|
@ -72,6 +72,8 @@ private:
|
|||||||
QGraphicsEllipseItem *ServosTextCircles[CCPM_MAX_SWASH_SERVOS];
|
QGraphicsEllipseItem *ServosTextCircles[CCPM_MAX_SWASH_SERVOS];
|
||||||
QSpinBox *SwashLvlSpinBoxes[CCPM_MAX_SWASH_SERVOS];
|
QSpinBox *SwashLvlSpinBoxes[CCPM_MAX_SWASH_SERVOS];
|
||||||
|
|
||||||
|
QString TypeText;
|
||||||
|
|
||||||
bool SwashLvlConfigurationInProgress;
|
bool SwashLvlConfigurationInProgress;
|
||||||
UAVObject::Metadata SwashLvlaccInitialData;
|
UAVObject::Metadata SwashLvlaccInitialData;
|
||||||
int SwashLvlState;
|
int SwashLvlState;
|
||||||
|
Loading…
Reference in New Issue
Block a user