|
|
@ -58,13 +58,19 @@ AirframeComponentController::AirframeComponentController(void) : |
|
|
|
|
|
|
|
|
|
|
|
bool autostartFound = false; |
|
|
|
bool autostartFound = false; |
|
|
|
_autostartId = getParameterFact(FactSystem::defaultComponentId, "SYS_AUTOSTART")->value().toInt(); |
|
|
|
_autostartId = getParameterFact(FactSystem::defaultComponentId, "SYS_AUTOSTART")->value().toInt(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (const AirframeComponentAirframes::AirframeType_t* pType=&AirframeComponentAirframes::rgAirframeTypes[0]; pType->name != NULL; pType++) { |
|
|
|
for (unsigned tindex = 0; tindex < AirframeComponentAirframes::rgAirframeTypes.count(); tindex++) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const AirframeComponentAirframes::AirframeType_t* pType = &AirframeComponentAirframes::rgAirframeTypes.values().at(tindex); |
|
|
|
|
|
|
|
|
|
|
|
AirframeType* airframeType = new AirframeType(pType->name, pType->imageResource, this); |
|
|
|
AirframeType* airframeType = new AirframeType(pType->name, pType->imageResource, this); |
|
|
|
Q_CHECK_PTR(airframeType); |
|
|
|
Q_CHECK_PTR(airframeType); |
|
|
|
|
|
|
|
|
|
|
|
int index = 0; |
|
|
|
for (unsigned index = 0; index < pType->rgAirframeInfo.count(); index++) { |
|
|
|
for (const AirframeComponentAirframes::AirframeInfo_t* pInfo=&pType->rgAirframeInfo[0]; pInfo->name != NULL; pInfo++) { |
|
|
|
const AirframeComponentAirframes::AirframeInfo_t* pInfo = &pType->rgAirframeInfo.at(index); |
|
|
|
|
|
|
|
|
|
|
|
if (_autostartId == pInfo->autostartId) { |
|
|
|
if (_autostartId == pInfo->autostartId) { |
|
|
|
Q_ASSERT(!autostartFound); |
|
|
|
Q_ASSERT(!autostartFound); |
|
|
|
autostartFound = true; |
|
|
|
autostartFound = true; |
|
|
@ -73,7 +79,6 @@ AirframeComponentController::AirframeComponentController(void) : |
|
|
|
_currentVehicleIndex = index; |
|
|
|
_currentVehicleIndex = index; |
|
|
|
} |
|
|
|
} |
|
|
|
airframeType->addAirframe(pInfo->name, pInfo->autostartId); |
|
|
|
airframeType->addAirframe(pInfo->name, pInfo->autostartId); |
|
|
|
index++; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_airframeTypes.append(QVariant::fromValue(airframeType)); |
|
|
|
_airframeTypes.append(QVariant::fromValue(airframeType)); |
|
|
|