From: Bertrand <bco...@us...> - 2017-03-11 19:50:06
|
Update of /cvsroot/jsbsim/JSBSim/src/models/propulsion In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21534/src/models/propulsion Modified Files: FGTurboProp.cpp Log Message: Stricter checking in FGTable revived the bug [#84]. This commit provides a fix to the problem: the table name 'EnginePowerVC' is prepended with 'propulsion/engine[#]' Index: FGTurboProp.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/src/models/propulsion/FGTurboProp.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** FGTurboProp.cpp 26 Feb 2017 11:41:28 -0000 1.36 --- FGTurboProp.cpp 11 Mar 2017 19:50:03 -0000 1.37 *************** *** 147,151 **** string name = table_element->GetAttributeValue("name"); if (!EnginePowerVC && name == "EnginePowerVC") { ! EnginePowerVC = new FGTable(PropertyManager, table_element); cerr << table_element->ReadFrom() <<"Note: Using the EnginePowerVC without enclosed <function> tag is deprecated" --- 147,158 ---- string name = table_element->GetAttributeValue("name"); if (!EnginePowerVC && name == "EnginePowerVC") { ! // Get a different name for each engines otherwise FGTable::bind() will ! // complain that the property 'EnginePowerVC' is already bound. This is a ! // ugly hack but the functionality is obsolete and will be removed some ! // time in the future. ! table_element->SetAttributeValue("name", string("propulsion/engine[#]/") + name); ! EnginePowerVC = new FGTable(PropertyManager, table_element, ! to_string((int)EngineNumber)); ! table_element->SetAttributeValue("name", name); cerr << table_element->ReadFrom() <<"Note: Using the EnginePowerVC without enclosed <function> tag is deprecated" |