mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
Move Config plugin for fixed wings back to oly Aileron type per Eric
This commit is contained in:
parent
221dd1308f
commit
a4d2582cec
@ -53,11 +53,11 @@ ConfigFixedWingWidget::ConfigFixedWingWidget(QWidget *parent) :
|
|||||||
populateChannelComboBoxes();
|
populateChannelComboBoxes();
|
||||||
|
|
||||||
QStringList fixedWingTypes;
|
QStringList fixedWingTypes;
|
||||||
fixedWingTypes << "Aileron Dual Servo" << "Aileron Single Servo" << "Elevon";
|
fixedWingTypes << "Aileron" << "Elevon";
|
||||||
m_aircraft->fixedWingType->addItems(fixedWingTypes);
|
m_aircraft->fixedWingType->addItems(fixedWingTypes);
|
||||||
|
|
||||||
// Set default model to "Aileron Dual Servo"
|
// Set default model to "Aileron"
|
||||||
m_aircraft->fixedWingType->setCurrentIndex(m_aircraft->fixedWingType->findText("Aileron Dual Servo"));
|
m_aircraft->fixedWingType->setCurrentIndex(m_aircraft->fixedWingType->findText("Aileron"));
|
||||||
|
|
||||||
setupUI(m_aircraft->fixedWingType->currentText());
|
setupUI(m_aircraft->fixedWingType->currentText());
|
||||||
|
|
||||||
@ -135,9 +135,9 @@ void ConfigFixedWingWidget::setupUI(QString frameType)
|
|||||||
|
|
||||||
qDebug() << "Current Aircraft type: \n" << m_aircraft->fixedWingType->currentText();
|
qDebug() << "Current Aircraft type: \n" << m_aircraft->fixedWingType->currentText();
|
||||||
|
|
||||||
if (frameType == "FixedWing" || frameType == "Aileron Dual Servo") {
|
if (frameType == "FixedWing" || frameType == "Aileron") {
|
||||||
plane->setElementId("aileron");
|
plane->setElementId("aileron");
|
||||||
setComboCurrentIndex(m_aircraft->fixedWingType, m_aircraft->fixedWingType->findText("Aileron Dual Servo"));
|
setComboCurrentIndex(m_aircraft->fixedWingType, m_aircraft->fixedWingType->findText("Aileron"));
|
||||||
resetChannelboxesAndSliders();
|
resetChannelboxesAndSliders();
|
||||||
|
|
||||||
m_aircraft->fwRudder1ChannelBox->setEnabled(true);
|
m_aircraft->fwRudder1ChannelBox->setEnabled(true);
|
||||||
@ -152,22 +152,6 @@ void ConfigFixedWingWidget::setupUI(QString frameType)
|
|||||||
m_aircraft->fwElevator1Label->setText("Elevator 1");
|
m_aircraft->fwElevator1Label->setText("Elevator 1");
|
||||||
m_aircraft->fwElevator2Label->setText("Elevator 2");
|
m_aircraft->fwElevator2Label->setText("Elevator 2");
|
||||||
|
|
||||||
} else if (frameType == "Aileron Single Servo") {
|
|
||||||
plane->setElementId("aileron-single");
|
|
||||||
setComboCurrentIndex(m_aircraft->fixedWingType, m_aircraft->fixedWingType->findText("Aileron Single Servo"));
|
|
||||||
resetChannelboxesAndSliders();
|
|
||||||
m_aircraft->fwRudder1ChannelBox->setEnabled(true);
|
|
||||||
m_aircraft->fwRudder2ChannelBox->setEnabled(true);
|
|
||||||
m_aircraft->fwElevator1ChannelBox->setEnabled(true);
|
|
||||||
m_aircraft->fwElevator2ChannelBox->setEnabled(true);
|
|
||||||
m_aircraft->fwAileron1ChannelBox->setEnabled(true);
|
|
||||||
m_aircraft->fwAileron2ChannelBox->setEnabled(false);
|
|
||||||
|
|
||||||
m_aircraft->fwAileron1Label->setText("Aileron 1");
|
|
||||||
m_aircraft->fwAileron2Label->setText("Aileron 2");
|
|
||||||
m_aircraft->fwElevator1Label->setText("Elevator 1");
|
|
||||||
m_aircraft->fwElevator2Label->setText("Elevator 2");
|
|
||||||
|
|
||||||
} else if (frameType == "FixedWingVtail" || frameType == "Vtail") {
|
} else if (frameType == "FixedWingVtail" || frameType == "Vtail") {
|
||||||
// do nothing for now
|
// do nothing for now
|
||||||
} else if (frameType == "FixedWingElevon" || frameType == "Elevon") {
|
} else if (frameType == "FixedWingElevon" || frameType == "Elevon") {
|
||||||
@ -218,7 +202,7 @@ void ConfigFixedWingWidget::setupEnabledControls(QString frameType)
|
|||||||
// enableComboBoxes(this, CHANNELBOXNAME, 3, true);
|
// enableComboBoxes(this, CHANNELBOXNAME, 3, true);
|
||||||
} else if (frameType == "Elevon" || frameType == "Elevon") {
|
} else if (frameType == "Elevon" || frameType == "Elevon") {
|
||||||
enableComboBoxes(this, CHANNELBOXNAME, 3, true);
|
enableComboBoxes(this, CHANNELBOXNAME, 3, true);
|
||||||
} else if (frameType == "aileron" || frameType == "Aileron Dual Servo" || frameType == "Aileron Single Servo") {
|
} else if (frameType == "aileron" || frameType == "Aileron") {
|
||||||
enableComboBoxes(this, CHANNELBOXNAME, 4, true);
|
enableComboBoxes(this, CHANNELBOXNAME, 4, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -316,7 +300,7 @@ QString ConfigFixedWingWidget::updateConfigObjectsFromWidgets()
|
|||||||
QString airframeType;
|
QString airframeType;
|
||||||
QList<QString> motor_servo_List;
|
QList<QString> motor_servo_List;
|
||||||
|
|
||||||
if (m_aircraft->fixedWingType->currentText() == "Aileron Dual Servo" || "aileron-single") {
|
if (m_aircraft->fixedWingType->currentText() == "Aileron") {
|
||||||
airframeType = "FixedWing";
|
airframeType = "FixedWing";
|
||||||
setupFrameFixedWing(airframeType);
|
setupFrameFixedWing(airframeType);
|
||||||
|
|
||||||
|
@ -261,9 +261,8 @@ void ConfigVehicleTypeWidget::updateObjectsFromWidgets()
|
|||||||
|
|
||||||
int ConfigVehicleTypeWidget::frameCategory(QString frameType)
|
int ConfigVehicleTypeWidget::frameCategory(QString frameType)
|
||||||
{
|
{
|
||||||
if (frameType == "FixedWing" || frameType == "Aileron Dual Servo" || frameType == "Aileron Single Servo"
|
if (frameType == "FixedWing" || frameType == "Aileron" || frameType == "FixedWingElevon"
|
||||||
|| frameType == "FixedWingElevon" || frameType == "Elevon" || frameType == "FixedWingVtail"
|
|| frameType == "Elevon" || frameType == "FixedWingVtail" || frameType == "Vtail") {
|
||||||
|| frameType == "Vtail") {
|
|
||||||
return ConfigVehicleTypeWidget::FIXED_WING;
|
return ConfigVehicleTypeWidget::FIXED_WING;
|
||||||
} else if (frameType == "Tri" || frameType == "Tricopter Y" || frameType == "QuadX" || frameType == "Quad X"
|
} else if (frameType == "Tri" || frameType == "Tricopter Y" || frameType == "QuadX" || frameType == "Quad X"
|
||||||
|| frameType == "QuadP" || frameType == "Quad +" || frameType == "Hexa" || frameType == "Hexacopter"
|
|| frameType == "QuadP" || frameType == "Quad +" || frameType == "Hexa" || frameType == "Hexacopter"
|
||||||
|
@ -35,7 +35,7 @@ FixedWingPage::FixedWingPage(SetupWizard *wizard, QWidget *parent) :
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
QSvgRenderer *renderer = new QSvgRenderer();
|
QSvgRenderer *renderer = new QSvgRenderer();
|
||||||
renderer->load(QString(":/configgadget/images/fixedwing-shapes.svg"));
|
renderer->load(QString(":/setupwizard/resources/fixedwing-shapes-wizard-no-numbers.svg"));
|
||||||
m_fixedwingPic = new QGraphicsSvgItem();
|
m_fixedwingPic = new QGraphicsSvgItem();
|
||||||
m_fixedwingPic->setSharedRenderer(renderer);
|
m_fixedwingPic->setSharedRenderer(renderer);
|
||||||
QGraphicsScene *scene = new QGraphicsScene(this);
|
QGraphicsScene *scene = new QGraphicsScene(this);
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
<file>resources/wizard.png</file>
|
<file>resources/wizard.png</file>
|
||||||
<file>resources/multirotor-shapes.svg</file>
|
<file>resources/multirotor-shapes.svg</file>
|
||||||
<file>resources/fixedwing-shapes-wizard.svg</file>
|
<file>resources/fixedwing-shapes-wizard.svg</file>
|
||||||
|
<file>resources/fixedwing-shapes-wizard-no-numbers.svg</file>
|
||||||
<!-- these are different from the files in /config/images -->
|
<!-- these are different from the files in /config/images -->
|
||||||
<file>resources/bttn-illustration-down.png</file>
|
<file>resources/bttn-illustration-down.png</file>
|
||||||
<file>resources/bttn-illustration-up.png</file>
|
<file>resources/bttn-illustration-up.png</file>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user