1
0
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:
Kevin Finisterre 2013-12-18 16:41:38 -05:00
parent b6f0e5e305
commit 33d963d24e
2 changed files with 17 additions and 16 deletions

View File

@ -53,27 +53,28 @@ QStringList ConfigFixedWingWidget::getChannelDescriptions()
// get the gui config data
GUIConfigDataUnion configData = getConfigData();
fixedGUISettingsStruct fixed = configData.fixedwing;
if (configData.fixedwing.FixedWingPitch1 > 0) {
channelDesc[configData.fixedwing.FixedWingPitch1 - 1] = QString("FixedWingPitch1");
if (fixed.FixedWingThrottle > 0 && fixed.FixedWingThrottle <= ConfigFixedWingWidget::CHANNEL_NUMELEM) {
channelDesc[fixed.FixedWingThrottle - 1] = QString("fixed.WingThrottle");
}
if (configData.fixedwing.FixedWingPitch2 > 0) {
channelDesc[configData.fixedwing.FixedWingPitch2 - 1] = QString("FixedWingPitch2");
if (fixed.FixedWingPitch1 > 0 && fixed.FixedWingPitch1 <= ConfigFixedWingWidget::CHANNEL_NUMELEM) {
channelDesc[fixed.FixedWingPitch1 - 1] = QString("FixedWingPitch1");
}
if (configData.fixedwing.FixedWingRoll1 > 0) {
channelDesc[configData.fixedwing.FixedWingRoll1 - 1] = QString("FixedWingRoll1");
if (fixed.FixedWingPitch2 > 0 && fixed.FixedWingPitch2 <= ConfigFixedWingWidget::CHANNEL_NUMELEM) {
channelDesc[fixed.FixedWingPitch2 - 1] = QString("FixedWingPitch2");
}
if (configData.fixedwing.FixedWingRoll2 > 0) {
channelDesc[configData.fixedwing.FixedWingRoll2 - 1] = QString("FixedWingRoll2");
if (fixed.FixedWingRoll1 > 0 && fixed.FixedWingRoll1 <= ConfigFixedWingWidget::CHANNEL_NUMELEM) {
channelDesc[fixed.FixedWingRoll1 - 1] = QString("FixedWingRoll1");
}
if (configData.fixedwing.FixedWingYaw1 > 0) {
channelDesc[configData.fixedwing.FixedWingYaw1 - 1] = QString("FixedWingYaw1");
if (fixed.FixedWingRoll2 > 0 && fixed.FixedWingRoll2 <= ConfigFixedWingWidget::CHANNEL_NUMELEM) {
channelDesc[fixed.FixedWingRoll2 - 1] = QString("FixedWingRoll2");
}
if (configData.fixedwing.FixedWingYaw2 > 0) {
channelDesc[configData.fixedwing.FixedWingYaw2 - 1] = QString("FixedWingYaw2");
if (fixed.FixedWingYaw1 > 0 && fixed.FixedWingYaw1 <= ConfigFixedWingWidget::CHANNEL_NUMELEM) {
channelDesc[fixed.FixedWingYaw1 - 1] = QString("FixedWingYaw1");
}
if (configData.fixedwing.FixedWingThrottle > 0) {
channelDesc[configData.fixedwing.FixedWingThrottle - 1] = QString("FixedWingThrottle");
if (fixed.FixedWingYaw2 > 0 && fixed.FixedWingYaw2 <= ConfigFixedWingWidget::CHANNEL_NUMELEM) {
channelDesc[fixed.FixedWingYaw2 - 1] = QString("FixedWingYaw2");
}
return channelDesc;
}

View File

@ -147,7 +147,7 @@ void OutputCalibrationPage::setupVehicle()
ui->vehicleView->setScene(m_vehicleScene);
}
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_vehicleHighlightElementIndexes << 0 << 1;
m_channelIndex << 0 << 0 << 1 << 2 << 3 << 4;
@ -179,7 +179,7 @@ void OutputCalibrationPage::setupVehicle()
ui->vehicleView->setScene(m_vehicleScene);
}
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_vehicleHighlightElementIndexes << 0 << 1;
m_channelIndex << 0 << 0 << 1 << 2;