static const char *IdHdr = ID_FCS;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
static const char *IdHdr = ID_FCS;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for (i=0; i<ThrottlePos.size(); i++) ThrottlePos[i] = ThrottleCmd[i];
for (i=0; i<MixturePos.size(); i++) MixturePos[i] = MixtureCmd[i];
for (i=0; i<PropAdvance.size(); i++) PropAdvance[i] = PropAdvanceCmd[i];
for (i=0; i<ThrottlePos.size(); i++) ThrottlePos[i] = ThrottleCmd[i];
for (i=0; i<MixturePos.size(); i++) MixturePos[i] = MixtureCmd[i];
for (i=0; i<PropAdvance.size(); i++) PropAdvance[i] = PropAdvanceCmd[i];
// ToDo: The handling of name and file attributes could be improved, here,
// considering that a name can be in the external file, as well.
name = el->GetAttributeValue("name");
// ToDo: The handling of name and file attributes could be improved, here,
// considering that a name can be in the external file, as well.
name = el->GetAttributeValue("name");
fname = el->GetAttributeValue("file");
if (systype == stSystem) {
file = FindSystemFullPathname(fname);
} else {
fname = el->GetAttributeValue("file");
if (systype == stSystem) {
file = FindSystemFullPathname(fname);
} else {
- fullpath = systemPath + separator;
- localpath = aircraftPath + separator + "Systems" + separator;
+ if (system_filename.length() <=4 || system_filename.substr(system_filename.length()-4, 4) != ".xml") {
+ system_filename.append(".xml");
+ }
if ( !system_file.is_open()) {
cerr << " Could not open system file: " << system_filename << " in path "
<< fullpath << " or " << localpath << endl;
return string("");
} else {
if ( !system_file.is_open()) {
cerr << " Could not open system file: " << system_filename << " in path "
<< fullpath << " or " << localpath << endl;
return string("");
} else {
string systemPath = FDMExec->GetSystemsPath();
string aircraftPath = FDMExec->GetFullAircraftPath();
ifstream* system_file = new ifstream();
string systemPath = FDMExec->GetSystemsPath();
string aircraftPath = FDMExec->GetFullAircraftPath();
ifstream* system_file = new ifstream();
- fullpath = systemPath + separator;
- localpath = aircraftPath + separator + "Systems" + separator;
+ if (system_filename.substr(system_filename.length()-4, 4) != ".xml") {
+ system_filename.append(".xml");
+ }
if ( !system_file->is_open()) {
cerr << " Could not open system file: " << system_filename << " in path "
<< fullpath << " or " << localpath << endl;
if ( !system_file->is_open()) {
cerr << " Could not open system file: " << system_filename << " in path "
<< fullpath << " or " << localpath << endl;