mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-11 19:24:10 +01:00
prepping to fix refreshWidgetsValues() so that Output & Vehicle screens populate properly after wizard is run.
This commit is contained in:
parent
b6f0e5e305
commit
33d963d24e
@ -53,27 +53,28 @@ QStringList ConfigFixedWingWidget::getChannelDescriptions()
|
|||||||
|
|
||||||
// get the gui config data
|
// get the gui config data
|
||||||
GUIConfigDataUnion configData = getConfigData();
|
GUIConfigDataUnion configData = getConfigData();
|
||||||
|
fixedGUISettingsStruct fixed = configData.fixedwing;
|
||||||
|
|
||||||
if (configData.fixedwing.FixedWingPitch1 > 0) {
|
if (fixed.FixedWingThrottle > 0 && fixed.FixedWingThrottle <= ConfigFixedWingWidget::CHANNEL_NUMELEM) {
|
||||||
channelDesc[configData.fixedwing.FixedWingPitch1 - 1] = QString("FixedWingPitch1");
|
channelDesc[fixed.FixedWingThrottle - 1] = QString("fixed.WingThrottle");
|
||||||
}
|
}
|
||||||
if (configData.fixedwing.FixedWingPitch2 > 0) {
|
if (fixed.FixedWingPitch1 > 0 && fixed.FixedWingPitch1 <= ConfigFixedWingWidget::CHANNEL_NUMELEM) {
|
||||||
channelDesc[configData.fixedwing.FixedWingPitch2 - 1] = QString("FixedWingPitch2");
|
channelDesc[fixed.FixedWingPitch1 - 1] = QString("FixedWingPitch1");
|
||||||
}
|
}
|
||||||
if (configData.fixedwing.FixedWingRoll1 > 0) {
|
if (fixed.FixedWingPitch2 > 0 && fixed.FixedWingPitch2 <= ConfigFixedWingWidget::CHANNEL_NUMELEM) {
|
||||||
channelDesc[configData.fixedwing.FixedWingRoll1 - 1] = QString("FixedWingRoll1");
|
channelDesc[fixed.FixedWingPitch2 - 1] = QString("FixedWingPitch2");
|
||||||
}
|
}
|
||||||
if (configData.fixedwing.FixedWingRoll2 > 0) {
|
if (fixed.FixedWingRoll1 > 0 && fixed.FixedWingRoll1 <= ConfigFixedWingWidget::CHANNEL_NUMELEM) {
|
||||||
channelDesc[configData.fixedwing.FixedWingRoll2 - 1] = QString("FixedWingRoll2");
|
channelDesc[fixed.FixedWingRoll1 - 1] = QString("FixedWingRoll1");
|
||||||
}
|
}
|
||||||
if (configData.fixedwing.FixedWingYaw1 > 0) {
|
if (fixed.FixedWingRoll2 > 0 && fixed.FixedWingRoll2 <= ConfigFixedWingWidget::CHANNEL_NUMELEM) {
|
||||||
channelDesc[configData.fixedwing.FixedWingYaw1 - 1] = QString("FixedWingYaw1");
|
channelDesc[fixed.FixedWingRoll2 - 1] = QString("FixedWingRoll2");
|
||||||
}
|
}
|
||||||
if (configData.fixedwing.FixedWingYaw2 > 0) {
|
if (fixed.FixedWingYaw1 > 0 && fixed.FixedWingYaw1 <= ConfigFixedWingWidget::CHANNEL_NUMELEM) {
|
||||||
channelDesc[configData.fixedwing.FixedWingYaw2 - 1] = QString("FixedWingYaw2");
|
channelDesc[fixed.FixedWingYaw1 - 1] = QString("FixedWingYaw1");
|
||||||
}
|
}
|
||||||
if (configData.fixedwing.FixedWingThrottle > 0) {
|
if (fixed.FixedWingYaw2 > 0 && fixed.FixedWingYaw2 <= ConfigFixedWingWidget::CHANNEL_NUMELEM) {
|
||||||
channelDesc[configData.fixedwing.FixedWingThrottle - 1] = QString("FixedWingThrottle");
|
channelDesc[fixed.FixedWingYaw2 - 1] = QString("FixedWingYaw2");
|
||||||
}
|
}
|
||||||
return channelDesc;
|
return channelDesc;
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,7 @@ void OutputCalibrationPage::setupVehicle()
|
|||||||
ui->vehicleView->setScene(m_vehicleScene);
|
ui->vehicleView->setScene(m_vehicleScene);
|
||||||
}
|
}
|
||||||
qDebug() << "no clue what a wizard index is!";
|
qDebug() << "no clue what a wizard index is!";
|
||||||
m_wizardIndexes << 0 << 1 << 2 << 2 << 2 << 2; // These come from OutputCalibrationPage::setWizardPage()
|
m_wizardIndexes << 0 << 1 << 3 << 3 << 3 << 3; // These come from OutputCalibrationPage::setWizardPage()
|
||||||
m_vehicleElementIds << "fixed-aileron" << "aileron";
|
m_vehicleElementIds << "fixed-aileron" << "aileron";
|
||||||
m_vehicleHighlightElementIndexes << 0 << 1;
|
m_vehicleHighlightElementIndexes << 0 << 1;
|
||||||
m_channelIndex << 0 << 0 << 1 << 2 << 3 << 4;
|
m_channelIndex << 0 << 0 << 1 << 2 << 3 << 4;
|
||||||
@ -179,7 +179,7 @@ void OutputCalibrationPage::setupVehicle()
|
|||||||
ui->vehicleView->setScene(m_vehicleScene);
|
ui->vehicleView->setScene(m_vehicleScene);
|
||||||
}
|
}
|
||||||
qDebug() << "no clue what a wizard index is!";
|
qDebug() << "no clue what a wizard index is!";
|
||||||
m_wizardIndexes << 0 << 2 << 2 << 2; // These come from OutputCalibrationPage::setWizardPage()
|
m_wizardIndexes << 0 << 0 << 3 << 3; // These come from OutputCalibrationPage::setWizardPage()
|
||||||
m_vehicleElementIds << "fixed-vtail" << "vtail";
|
m_vehicleElementIds << "fixed-vtail" << "vtail";
|
||||||
m_vehicleHighlightElementIndexes << 0 << 1;
|
m_vehicleHighlightElementIndexes << 0 << 1;
|
||||||
m_channelIndex << 0 << 0 << 1 << 2;
|
m_channelIndex << 0 << 0 << 1 << 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user