set_subsystem("od_gauge", new FGODGauge);
set_subsystem("hud", new HUD);
- config_props = new SGPropertyNode;
+ SGPropertyNode_ptr config_props = new SGPropertyNode;
SGPropertyNode *path_n = fgGetNode("/sim/instrumentation/path");
if (path_n) {
- SGPath config( globals->get_fg_root() );
- config.append( path_n->getStringValue() );
-
+ SGPath config = globals->resolve_aircraft_path(path_n->getStringValue());
+
SG_LOG( SG_ALL, SG_INFO, "Reading instruments from "
<< config.str() );
try {
readProperties( config.str(), config_props );
- if ( !build() ) {
+ if ( !build(config_props) ) {
throw sg_error(
"Detected an internal inconsistency in the instrumentation\n"
"system specification file. See earlier errors for details.");
"No instrumentation model specified for this model!");
}
- delete config_props;
-
if (!_explicitGps) {
SG_LOG(SG_INSTR, SG_INFO, "creating default GPS instrument");
SGPropertyNode_ptr nd(new SGPropertyNode);
{
}
-bool FGInstrumentMgr::build ()
+bool FGInstrumentMgr::build (SGPropertyNode* config_props)
{
for ( int i = 0; i < config_props->nChildren(); ++i ) {
SGPropertyNode *node = config_props->getChild(i);